Part Number Hot Search : 
21010 SK261 MC68HC AAT8660C MC68HC 4AHC1 025AT AD8001AQ
Product Description
Full Text Search
 

To Download DSPIC33FJ64GS606 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2009-2012 microchip technology inc. ds70591e-page 1 dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 operating conditions ? 3.0v to 3.6v, -40oc to +85oc, dc to 50 mips ? 3.0v to 3.6v, -40oc to +125oc, dc to 40 mips core: 16-bit dspic33f ? code-efficient (c and assembly) architecture ? two 40-bit wide accumulators ? single-cycle (mac/mpy) with dual data fetch ? single-cycle mixed-sign mul plus hardware divide ? 32-bit multiply support clock management ? 1% internal oscillator ? programmable plls and oscillator clock sources ? fail-safe clock monitor (fscm) ? independent watchdog timer (wdt) ? fast wake-up and start-up power management ? low-power management modes (sleep, idle, doze) ? integrated power-on reset and brown-out reset ? 1.7 ma/mhz dynamic current (typical) ?50 a i pd current (typical) high-speed pwm ? up to 9 pwm pairs with independent timing ? dead time for rising and falling edges ? 1.04 ns pwm resolution ? pwm support for: - dc/dc, ac/dc, inverters, pfc, lighting - bldc, pmsm, acim, srm ? programmable fault inputs ? flexible trigger configurations for adc conversions advanced analog features ? high-speed adc module: - 10-bit resolution with up to two successive approximation register (sar) converters (up to 4 msps) - up to 24 input channels grouped into 12 conversion pairs plus two voltage reference monitoring inputs - dedicated result buffer for each analog channel ? flexible and independent adc trigger sources ? up to 4 high-speed comparators with direct connection to the pwm module: - 10-bit digital-to-analog converter (dac) for each comparator - dac reference output - programmable references with 1024 voltage points timers/output compare/input capture ? six general purpose timers: - five 16-bit and up to two 32-bit timers/counters ? four output compare (oc) modules configurable as timers/counters ? quadrature encoder interface (qei) module configurable as timer/counter ? four input capture (ic) modules communication interfaces ? two uart modules (12.5 mbps): - with support for lin/j2602 2.0 protocols and irda ? ? two 4-wire spi modules (15 mbps) ? ecan? module (1 mba ud) can 2.0b support ?two i 2 c? modules (up to 1 mbaud) with smbus support direct memory access (dma) ? 4-channel dma with user-selectable priority arbitration ? uart, spi, ecan?, ic, oc and timers input/output ? sink/source 18 ma on 18 pins, 10 ma on 1 pin or 6 ma on 66 pins ? 5v tolerant pins ? selectable open-drain and pull-ups ? 29 external interrupts qualification and class b support ? aec-q100 revg (grade 1 -40oc to +125oc) ? class b safety library, iec 60730, vde certified debugger development support ? in-circuit and in-application programming ? two program and two complex data breakpoints ? ieee 1149.2 compatible (jtag) boundary scan ? trace and run-time watch 16-bit digital signal controllers with high-speed pwm, adc and comparators
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 2 ? 2009-2012 microchip technology inc. dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 product families the device names, pin counts, memory sizes, and peripheral availability of each device are listed in table 1 . the following pages show their pinout diagrams. table 1: dspic33fj32gs406/606/608/61 0 and dspic33fj64gs406/606/608/610 controller families device pins program flash memory (kbytes) ram (bytes) 16-bit timer input capture output compare uart quadrature encoder interface spi ecan? dma channels pwm analog comparator external interrupts dac output i 2 c? adc i/o pins packages sars sample-and-hold (s&h) circuit analog-to-digital inputs dspic33fj32gs406 64 32 4k 5 4 4 2 1 2 0 0 6x2 0 5 0 2 1 5 16 58 pt, mr dspic33fj32gs606 64 32 4k 5 4 4 2 2 2 0 0 6x2 4 5 1 2 2 6 16 58 pt, mr dspic33fj32gs608 80 32 4k 5 4 4 2 2 2 0 0 8x2 4 5 1 2 2 6 18 74 pt dspic33fj32gs610 100 32 4k 5 4 4 2 2 2 0 0 9x2 4 5 1 2 2 6 24 85 pt, pf dspic33fj64gs406 64 64 8k 5 4 4 2 1 2 0 0 6x2 0 5 0 2 1 5 16 58 pt, mr DSPIC33FJ64GS606 64 64 9k ( 1 ) 544222146x24512261658pt, mr dspic33fj64gs608 80 64 9k ( 1 ) 544222148x24512261874pt dspic33fj64gs610 100 64 9k ( 1 ) 544222149x24512262485pt, pf note 1: ram size is inclusive of 1-kbyte dma ram.
? 2009-2012 microchip technology inc. ds70591e-page 3 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 pin diagrams 64-pin tqfp 1 2 3 4 5 6 7 8 9 10 11 12 13 36 35 34 33 32 31 30 29 28 27 26 64 63 62 61 60 59 58 57 56 14 15 16 17 18 19 20 21 22 23 24 25 dspic33fj32gs406 pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/int4/rd11 ic2/flt2/u1cts /int2/rd9 ic1/flt1/synci1/int1/rd8 v ss osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 u1rts /sck1/int0/rf6 u1rx/sdi1/rf2 u1tx/sdo1/rf3 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr v ss v dd an3/aindx1/cn5/rb3 an2/ass1 /cn4/rb2 pgec3/an1/cn3/rb1 pged3/an0/cn2/rb0 pwm5h/updn1/cn16/rd7 pwm3l/re4 pwm2h/re3 pwm2l/re2 v cap pwm1l/re0 rf1 pwm1h/re1 oc2/synco2/flt6/rd1 oc3/flt7/rd2 pgec1/an6/ocfa/rb6 pged1/an7/rb7 av dd av ss an8/u2cts /rb8 an9/rb9 tms/an10/rb10 tdo/an11/rb11 v ss v dd tck/an12/rb12 tdi/an13/rb13 an14/ss1 /u2rts /rb14 an15/cn12/rb15 u2tx/scl2/cn18/rf5 u2rx/sda2/flt17/cn17/rf4 sda1/rg3 43 42 41 40 39 38 37 44 48 47 46 50 49 51 54 53 52 55 45 ss2 /flt9/synci2/cn11/rg9 an5/aqeb1/cn7/rb5 an4/aqea1/cn6/rb4 ic3/indx1/flt3/int3/rd10 v dd synci4/rf0 oc4/synco1/rd3 pwm5l/cn15/rd6 pwm6h/cn14/rd5 pwm6l/cn13/rd4 dspic33fj64gs406 = pins are up to 5v tolerant
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 4 ? 2009-2012 microchip technology inc. pin diagrams (continued) 64-pin qfn pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/int4/rd11 ic2/flt2/u1cts /int2/rd9 ic1/flt1/synci1/int1/rd8 v ss osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 u1rts /sck1/int0/rf6 u1rx/sdi1/rf2 u1tx/sdo1/rf3 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr v ss v dd an3/aindx1/cn5/rb3 an2/ass1 /cn4/rb2 pgec3/an1/cn3/rb1 pged3/an0/cn2/rb0 pwm5h/updn1/cn16/rd7 pwm3l/re4 pwm2h/re3 pwm2l/re2 v cap pwm1l/re0 rf1 pwm1h/re1 oc2/synco2/flt6/rd1 oc3/flt7/rd2 pgec1/an6/ocfa/rb6 pged1/an7/rb7 av dd avss an8/u2cts /rb8 an9/rb9 tms/an10/rb10 tdo/an11/rb11 v ss v dd tck/an12/rb12 tdi/an13/rb13 an14/ss1 /u2rts /rb14 an15/cn12/rb15 u2tx/scl2/cn18/rf5 u2rx/sda2/flt17/cn17/rf4 sda1/rg3 ss2 /flt9/synci2/cn11/rg9 an5/aqeb1/cn7/rb5 an4/aqea1/cn6/rb4 ic3/indx1/flt3/int3/rd10 v dd synci4/rf0 oc4/synco1/rd3 pwm5l/cn15/rd6 pwm6h/cn14/rd5 pwm6l/cn13/rd4 64 63 62 61 60 59 58 57 56 55 22 23 24 25 26 27 28 29 30 31 3 40 39 38 37 36 35 34 33 4 5 7 8 9 10 11 1 2 42 41 6 32 43 54 14 15 16 12 13 17 18 19 20 21 45 44 47 46 48 53 52 51 50 49 dspic33fj32gs406 dspic33fj64gs406 = pins are up to 5v tolerant note: the metal plane at the bottom of the device is not c onnected to any pins and is recommended to be connected to v ss externally.
? 2009-2012 microchip technology inc. ds70591e-page 5 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 pin diagrams (continued) 64-pin tqfp 1 2 3 4 5 6 7 8 9 10 11 12 13 36 35 34 33 32 31 30 29 28 27 26 64 63 62 61 60 59 58 57 56 14 15 16 17 18 19 20 21 22 23 24 25 pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/int4/rd11 ic2/flt2/u1cts /int2/rd9 ic1/flt1/synci1/int1/rd8 v ss osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 u1rts /sck1/int0/rf6 u1rx/sdi1/rf2 u1tx/sdo1/rf3 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr v ss v dd an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 pwm5h/updn1/cn16/rd7 pwm3l/re4 pwm2h/re3 pwm2l/re2 v cap pwm1l/re0 rf1 pwm1h/re1 oc2/synco2/flt6/rd1 oc3/flt7/rd2 pgec1/an6/cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 av dd av ss an8/u2cts /rb8 an9/dacout/rb9 tms/an10/indx2/rb10 tdo/an11/extref/rb11 v ss v dd tck/an12/cmp1d/rb12 tdi/an13/cmp2d/rb13 an14/cmp3d/ss1 /u2rts /rb14 an15/cmp4d/cn12/rb15 u2tx/scl2/qeb2/cn18/rf5 u2rx/sda2/qea2/cn17/rf4 sda1/rg3 43 42 41 40 39 38 37 44 48 47 46 50 49 51 54 53 52 55 45 ss2 /flt9/synci2/t5ck/cn11/rg9 an5/cmp3b/aqeb1/cn7/rb5 an4/cmp2c/cmp3a/aqea1/cn6/rb4 ic3/indx1/flt3/int3/rd10 v dd synci4/rf0 oc4/synco1/flt8/rd3 pwm5l/cn15/rd6 pwm6h/cn14/rd5 pwm6l/cn13/rd4 dspic33fj32gs606 = pins are up to 5v tolerant
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 6 ? 2009-2012 microchip technology inc. pin diagrams (continued) 64-pin tqfp 1 2 3 4 5 6 7 8 9 10 11 12 13 36 35 34 33 32 31 30 29 28 27 26 64 63 62 61 60 59 58 57 56 14 15 16 17 18 19 20 21 22 23 24 25 pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/int4/rd11 ic2/flt2/u1cts /int2/rd9 ic1/flt1/synci1/int1/rd8 v ss osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 u1rts /sck1/int0/rf6 u1rx/sdi1/rf2 u1tx/sdo1/rf3 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr v ss v dd an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 pwm5h/updn1/cn16/rd7 pwm3l/re4 pwm2h/re3 pwm2l/re2 v cap pwm1l/re0 c1tx/rf1 pwm1h/re1 oc2/synco2/flt6/rd1 oc3/flt7/rd2 pgec1/an6/cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 av dd av ss an8/u2cts /rb8 an9/dacout/rb9 tms/an10/indx2/rb10 tdo/an11/extref/rb11 v ss v dd tck/an12/cmp1d/rb12 tdi/an13/cmp2d/rb13 an14/cmp3d/ss1 /u2rts /rb14 an15/cmp4d/cn12/rb15 u2tx/scl2/qeb2/cn18/rf5 u2rx/sda2/qea2/cn17/rf4 sda1/rg3 43 42 41 40 39 38 37 44 48 47 46 50 49 51 54 53 52 55 45 ss2 /flt9/synci2/t5ck/cn11/rg9 an5/cmp3b/aqeb1/cn7/rb5 an4/cmp2c/cmp3a/aqea1/cn6/rb4 ic3/indx1/flt3/int3/rd10 v dd c1rx/synci4/rf0 oc4/synco1/flt8/rd3 pwm5l/cn15/rd6 pwm6h/cn14/rd5 pwm6l/cn13/rd4 DSPIC33FJ64GS606 = pins are up to 5v tolerant
? 2009-2012 microchip technology inc. ds70591e-page 7 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 pin diagrams (continued) pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/int4/rd11 ic2/flt2/u1cts /int2/rd9 ic1/flt1/synci1/int1/rd8 v ss osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 u1rts /sck1/int0/rf6 u1rx/sdi1/rf2 u1tx/sdo1/rf3 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr v ss v dd an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 pwm5h/updn1/cn16/rd7 pwm3l/re4 pwm2h/re3 pwm2l/re2 v cap pwm1l/re0 rf1 pwm1h/re1 oc2/synco2/flt6/rd1 oc3/flt7/rd2 pgec1/an6/cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 av dd av ss an8/u2cts /rb8 an9/dacout/rb9 tms/an10/indx2/rb10 tdo/an11/extref/rb11 v ss v dd tck/an12/cmp1d/rb12 tdi/an13/cmp2d/rb13 an14/cmp3d/ss1 /u2rts /rb14 an15/cmp4d/cn12/rb15 u2tx/scl2/qeb2/cn18/rf5 u2rx/sda2/qea2/cn17/rf4 sda1/rg3 ss2 /flt9/synci2/t5ck/cn11/rg9 an5/cmp3b/aqeb1/cn7/rb5 an4/cmp2c/cmp3a/aqea1/cn6/rb4 ic3/indx1/flt3/int3/rd10 v dd synci4/rf0 oc4/synco1/flt8/rd3 pwm5l/cn15/rd6 pwm6h/cn14/rd5 pwm6l/cn13/rd4 64 63 62 61 60 59 58 57 56 55 22 23 24 25 26 27 28 29 30 31 3 40 39 38 37 36 35 34 33 4 5 7 8 9 10 11 1 2 42 41 6 32 43 54 14 15 16 12 13 17 18 19 20 21 45 44 47 46 48 53 52 51 50 49 dspic33fj32gs606 64-pin qfn = pins are up to 5v tolerant note: the metal plane at the bottom of the device is not c onnected to any pins and is recommended to be connected to v ss externally.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 8 ? 2009-2012 microchip technology inc. pin diagrams (continued) 64-pin qfn pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/int4/rd11 ic2/flt2/u1cts /int2/rd9 ic1/flt1/synci1/int1/rd8 v ss osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 u1rts /sck1/int0/rf6 u1rx/sdi1/rf2 u1tx/sdo1/rf3 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr v ss v dd an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 pwm5h/updn1/cn16/rd7 pwm3l/re4 pwm2h/re3 pwm2l/re2 v cap pwm1l/re0 c1tx/rf1 pwm1h/re1 oc2/synco2/flt6/rd1 oc3/flt7/rd2 pgec1/an6/cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 av dd av ss an8/u2cts /rb8 an9/dacout/rb9 tms/an10/indx2/rb10 tdo/an11/extref/rb11 v ss v dd tck/an12/cmp1d/rb12 tdi/an13/cmp2d/rb13 an14/cmp3d/ss1 /u2rts /rb14 an15/cmp4d/cn12/rb15 u2tx/scl2/qeb2/cn18/rf5 u2rx/sda2/qea2/cn17/rf4 sda1/rg3 ss2 /flt9/synci2/t5ck/cn11/rg9 an5/cmp3b/aqeb1/cn7/rb5 an4/cmp2c/cmp3a/aqea1/cn6/rb4 ic3/indx1/flt3/int3/rd10 v dd c1rx/synci4/rf0 oc4/synco1/flt8/rd3 pwm5l/cn15/rd6 pwm6h/cn14/rd5 pwm6l/cn13/rd4 64 63 62 61 60 59 58 57 56 55 22 23 24 25 26 27 28 29 30 31 3 40 39 38 37 36 35 34 33 4 5 7 8 9 10 11 1 2 42 41 6 32 43 54 14 15 16 12 13 17 18 19 20 21 45 44 47 46 48 53 52 51 50 49 DSPIC33FJ64GS606 = pins are up to 5v tolerant note: the metal plane at the bottom of the device is not c onnected to any pins and is recommended to be connected to v ss externally.
? 2009-2012 microchip technology inc. ds70591e-page 9 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 pin diagrams (continued) 80-pin tqfp 72 74 73 71 70 69 68 67 66 65 64 63 62 61 20 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 50 49 48 47 46 45 44 21 41 40 39 38 37 36 35 34 23 24 25 26 27 28 29 30 31 32 33 dspic33fj32gs608 17 18 19 75 1 57 56 55 54 53 52 51 60 59 58 43 42 76 78 77 79 22 80 qea2/rd12 pwm7h/oc4/synco1/flt8/rd3 oc3/flt7/rd2 oc2/synco2/flt6/rd1 pwm2l/re2 pwm1h/re1 pwm1l/re0 indx2/synci4/rg0 qeb2/rg1 c1tx/rf1 c1rx/rf0 pwm3l/re4 pwm2h/re3 pwm5h/updn1/cn16/rd7 pwm6h/cn14/rd5 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/rd11 ic2/flt2/rd9 ic1/flt1/synci1/rd8 sda2/int4/ra15 ic3/indx1/flt3/rd10 scl2/int3/flt20/ra14 v ss osc1/clkin/rc12 v dd scl1/rg2 u1rx/rf2 u1tx/rf3 pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 pwm8h/ra10 pwm8l/ra9 av dd av ss an8/u2cts /rb8 an9/dacout/rb9 an10/rb10 an11/extref/rb11 v dd u2rx/flt17/cn17/rf4 u1rts /flt16/synci2/cn21/rd15 u2tx/flt18/cn18/rf5 pgec1/an6cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr ss2 /flt9/t5ck/cn11/rg9 an4/cmp2c/cmp3a/aqea1/cn6/rb4 an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 v ss v dd pwm3h/re5 pwm4l/re6 tdo/flt14/int2/re9 tms/flt13/int1/re8 tck/an12/cmp1d/rb12 tdi/an13/cmp2d/rb13 an14/cmp3d/ss1 /u2rts /rb14 an15/cmp4d/cn12/rb15 v dd v cap pwm6l/cn13/rd4 pwm7l/cn19/rd13 sda1/rg3 sdi1/rf7 sdo1/rf8 an5/cmp3b/aqeb1/cn7/rb5 v ss osc2/refclko/clko/rc15 pwm5l/cn15/rd6 sck1/int0/rf6 u1cts /flt15/synci3/cn20/rd14 an16/t2ck/rc1 an17/t3ck/rc2 = pins are up to 5v tolerant
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 10 ? 2009-2012 microchip technology inc. pin diagrams (continued) 80-pin tqfp 72 74 73 71 70 69 68 67 66 65 64 63 62 61 20 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 50 49 48 47 46 45 44 21 41 40 39 38 37 36 35 34 23 24 25 26 27 28 29 30 31 32 33 17 18 19 75 1 57 56 55 54 53 52 51 60 59 58 43 42 76 78 77 79 22 80 qea2/rd12 pwm7h/oc4/synco1/flt8/rd3 oc3/flt7/rd2 oc2/synco2/flt6/rd1 pwm2l/re2 pwm1h/re1 pwm1l/re0 indx2/synci4/rg0 qeb2/rg1 c1tx/rf1 c1rx/rf0 pwm3l/re4 pwm2h/re3 pwm5h/updn1/cn16/rd7 pwm6h/cn14/rd5 oc1/qeb1/flt5/rd0 ic4/qea1/flt4/rd11 ic2/flt2/rd9 ic1/flt1/synci1/rd8 sda2/int4/ra15 ic3/indx1/flt3/rd10 scl2/int3/flt20/ra14 v ss osc1/clkin/rc12 v dd scl1/rg2 u1rx/rf2 u1tx/rf3 pgec2/sosco/t1ck/cn0/rc14 pged2/sosci/t4ck/cn1/rc13 pwm8h/ra10 pwm8l/ra9 av dd av ss an8/u2cts /rb8 an9/dacout/rb9 an10/rb10 an11/extref/rb11 v dd u2rx/flt17/cn17/rf4 u1rts /flt16/synci2/cn21/rd15 u2tx/flt18/cn18/rf5 pgec1/an6cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 pwm4h/re7 sck2/flt12/cn8/rg6 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 mclr ss2 /flt9/t5ck/cn11/rg9 an4/cmp2c/cmp3a/aqea1/cn6/rb4 an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 v ss v dd pwm3h/re5 pwm4l/re6 tdo/flt14/int2/re9 tms/flt13/int1/re8 tck/an12/cmp1d/rb12 tdi/an13/cmp2d/rb13 an14/cmp3d/ss1 /u2rts /rb14 an15/cmp4d/cn12/rb15 v dd v cap pwm6l/cn13/rd4 pwm7l/cn19/rd13 sda1/rg3 sdi1/rf7 sdo1/rf8 an5/cmp3b/aqeb1/cn7/rb5 v ss osc2/refclko/clko/rc15 pwm5l/cn15/rd6 sck1/int0/rf6 u1cts /flt15/synci3/cn20/rd14 an16/t2ck/rc1 an17/t3ck/rc2 dspic33fj64gs608 = pins are up to 5v tolerant
? 2009-2012 microchip technology inc. ds70591e-page 11 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 pin diagrams (continued) 100-pin tqfp 92 94 93 91 90 89 88 87 86 85 84 83 82 81 80 79 78 20 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 65 64 63 62 61 60 59 26 56 45 44 43 42 41 40 39 28 29 30 31 32 33 34 35 36 37 38 17 18 19 21 22 95 1 76 77 72 71 70 69 68 67 66 75 74 73 58 57 24 23 25 96 98 97 99 27 46 47 48 49 50 55 54 53 52 51 100 pwm6h/cn14/rd5 pwm6l/cn13/rd4 pwm7l/cn19/rd13 qea2/rd12 pwm7h/oc4/flt8/rd3 oc3/flt7/rd2 oc2/synco2/flt6/rd1 an23/cn23/ra7 an22/cn22/ra6 pwm2l/re2 pwm9h/rg13 pwm9l/rg12 synco1/flt23/rg14 pwm1h/re1 pwm1l/re0 indx2/rg0 pwm3l/re4 pwm2h/re3 c1rx/rf0 v cap pged2/sosci/cn1/rc13 oc1/qeb1/flt5/rd0 ic3/indx1/flt3/rd10 ic2/flt2/rd9 ic1/flt1/rd8 ic4/qea1/flt4/rd11 sda2/flt21/ra3 scl2/flt22/ra2 osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 sck1/int0/rf6 sdi1/rf7 sdo1/rf8 sda1/rg3 u1rx/rf2 u1tx/rf3 vss pgec2/sosco/t1ck/cn0/rc14 pwm8h/ra10 pwm8l/ra9 av dd av ss an8/rb8 an9/dacout/rb9 an10/rb10 an11/extref/rb11 v dd u2cts /rf12 u2rts /rf13 u1cts /flt15/synci3/cn20/rd14 u1rts /flt16/synci2/cn21/rd15 v dd v ss pgec1/an6/cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 u2tx/flt18/cn18/rf5 u2rx/flt17/cn17/rf4 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 v dd tms/ra0 an20/flt13/int1/re8 an21/flt14/int2/re9 an5/cmp3b/aqeb1/cn7/rb5 an4/cmp2c/cmp3a/aqea1/cn6/rb4 an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 synci1/rg15 v dd ss2 /flt9/cn11/rg9 mclr an12/cmp1d/rb12 an13/cmp2d/rb13 an14/cmp3d/ss1 /rb14 an15/cmp4d/cn12/rb15 qeb2/rg1 c1tx/rf1 pwm5h/updn1/cn16/rd7 pwm5l/cn15/rd6 tdo/ra5 int4/flt19/synci4/ra15 int3/flt20/ra14 v ss v ss v ss v dd tdi/ra4 tck/ra1 an16/t2ck/rc1 an17/t3ck/rc2 an18/t4ck/rc3 an19/t5ck/rc4 dspic33fj32gs610 = pins are up to 5v tolerant
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 12 ? 2009-2012 microchip technology inc. pin diagrams (continued) 92 94 93 91 90 89 88 87 86 85 84 83 82 81 80 79 78 20 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 65 64 63 62 61 60 59 26 56 45 44 43 42 41 40 39 28 29 30 31 32 33 34 35 36 37 38 17 18 19 21 22 95 1 76 77 72 71 70 69 68 67 66 75 74 73 58 57 24 23 25 96 98 97 99 27 46 47 48 49 50 55 54 53 52 51 100 pwm6h/cn14/rd5 pwm6l/cn13/rd4 pwm7l/cn19/rd13 qea2/rd12 pwm7h/oc4/flt8/rd3 oc3/flt7/rd2 oc2/synco2/flt6/rd1 an23/cn23/ra7 an22/cn22/ra6 pwm2l/re2 pwm9h/rg13 pwm9l/rg12 synco1/flt23/rg14 pwm1h/re1 pwm1l/re0 indx2/rg0 pwm3l/re4 pwm2h/re3 c1rx/rf0 v cap pged2/sosci/cn1/rc13 oc1/qeb1/flt5/rd0 ic3/indx1/flt3/rd10 ic2/flt2/rd9 ic1/flt1/rd8 ic4/qea1/flt4/rd11 sda2/flt21/ra3 scl2/flt22/ra2 osc2/refclko/clko/rc15 osc1/clkin/rc12 v dd scl1/rg2 sck1/int0/rf6 sdi1/rf7 sdo1/rf8 sda1/rg3 u1rx/rf2 u1tx/rf3 vss pgec2/sosco/t1ck/cn0/rc14 pwm8h/ra10 pwm8l/ra9 av dd av ss an8/rb8 an9/dacout/rb9 an10/rb10 an11/extref/rb11 v dd u2cts /rf12 u2rts /rf13 u1cts /flt15/synci3/cn20/rd14 u1rts /flt16/synci2/cn21/rd15 v dd v ss pgec1/an6/cmp3c/cmp4a/ocfa/rb6 pged1/an7/cmp4b/rb7 u2tx/flt18/cn18/rf5 u2rx/flt17/cn17/rf4 pwm3h/re5 pwm4l/re6 pwm4h/re7 sck2/flt12/cn8/rg6 v dd tms/ra0 an20/flt13/int1/re8 an21/flt14/int2/re9 an5/cmp3b/aqeb1/cn7/rb5 an4/cmp2c/cmp3a/aqea1/cn6/rb4 an3/cmp2b/aindx1/cn5/rb3 an2/cmp1c/cmp2a/ass1 /cn4/rb2 sdi2/flt11/cn9/rg7 sdo2/flt10/cn10/rg8 pgec3/an1/cmp1b/cn3/rb1 pged3/an0/cmp1a/cmp4c/cn2/rb0 synci1/rg15 v dd ss2 /flt9/cn11/rg9 mclr an12/cmp1d/rb12 an13/cmp2d/rb13 an14/cmp3d/ss1 /rb14 an15/cmp4d/cn12/rb15 qeb2/rg1 c1tx/rf1 pwm5h/updn1/cn16/rd7 pwm5l/cn15/rd6 tdo/ra5 int4/flt19/synci4/ra15 int3/flt20/ra14 v ss v ss v ss v dd tdi/ra4 tck/ra1 an16/t2ck/rc1 an17/t3ck/rc2 an18/t4ck/rc3 an19/t5ck/rc4 dspic33fj64gs610 = pins are up to 5v tolerant 100-pin tqfp
? 2009-2012 microchip technology inc. ds70591e-page 13 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table of contents dspic33fj32gs406/606/608/610 and dspic33fj64g s406/606/608/610 product families ................................................. .............. 2 1.0 device overview ............................................................................................................. ........................................................... 17 2.0 guidelines for getting started with 16 -bit digital signal controllers....................................................... ................................... 23 3.0 cpu......................................................................................................................... ................................................................... 33 4.0 memory organization ......................................................................................................... ........................................................ 45 5.0 flash program memory........................................................................................................ .................................................... 109 6.0 resets ..................................................................................................................... ................................................................ 115 7.0 interrupt controller ........................................................................................................ ........................................................... 123 8.0 direct memory access (dma) .................................................................................................. ................................................ 177 9.0 oscillator configuration .................................................................................................... ........................................................ 187 10.0 power-saving features...................................................................................................... ...................................................... 201 11.0 i/o ports ................................................................................................................. ................................................................. 211 12.0 timer1 ..................................................................................................................... ................................................................. 215 13.0 timer2/3/4/5 features ..................................................................................................... ......................................................... 217 14.0 input capture.............................................................................................................. .............................................................. 223 15.0 output compare............................................................................................................. .......................................................... 225 16.0 high-speed pwm............................................................................................................. ........................................................ 229 17.0 quadrature encoder interface (qei) module .................................................................................. ......................................... 257 18.0 serial peripheral interface (spi).......................................................................................... ..................................................... 261 19.0 inter-integrated circuit (i 2 c?) ............................................................................................................................ ..................... 267 20.0 universal asynchronous receiv er transmitter (uart) ......................................................................... .................................. 275 21.0 enhanced can (ecan?) module................................................................................................ ........................................... 281 22.0 high-speed, 10-bit analog-to-digital converter (adc)....................................................................... ..................................... 309 23.0 high-speed analog comparator ............................................................................................... ............................................... 341 24.0 special features ........................................................................................................... ........................................................... 345 25.0 instruction set summary .................................................................................................... ...................................................... 353 26.0 development support........................................................................................................ ....................................................... 361 27.0 electrical characteristics ................................................................................................. ......................................................... 365 28.0 50 mips electrical characteristics ......................................................................................... .................................................. 413 29.0 dc and ac device characteristics graphs.................................................................................... .......................................... 421 30.0 packaging information...................................................................................................... ........................................................ 423 appendix a: migrating from dspic33fj06g s101/x02 and dspic33fj16gsx02/x04 to dspic33fj32gs406/606/608/610 and dspic33f j64gs406/606/608/610 devices ..................................................... 437 appendix b: revision history................................................................................................... .......................................................... 438 the microchip web site ......................................................................................................... ............................................................ 451 customer change notification service ........................................................................................... ................................................... 451 customer support ............................................................................................................... ............................................................... 451 reader response ................................................................................................................ .............................................................. 452 product identification system .................................................................................................. .......................................................... 453
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 14 ? 2009-2012 microchip technology inc. to our valued customers it is our intention to provide our valued cu stomers with the best documentation possible to ensure successful use of your micro chip products. to this end, we will continue to improve our publicati ons to better suit your needs. our publications will be refined and enhanced as new volumes and updates are introduced. if you have any questions or comments regar ding this publication, please contact the marketing communications department via e-mail at docerrors@microchip.com or fax the reader response form in the back of this data sheet to (480) 792-4150. we welcome your feedback. most current data sheet to obtain the most up-to-date version of this data s heet, please register at our worldwide web site at: http://www.microchip.com you can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page . the last character of the literature number is the vers ion number, (e.g., ds30000a is version a of document ds30000). errata an errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for curren t devices. as device/docum entation issues become known to us, we will publish an errata sheet. t he errata will s pecify the revisi on of silicon and revision of document to which it applies. to determine if an errata sheet exists for a partic ular device, please check with one of the following: ? microchip?s worldwide web site; http://www.microchip.com ? your local microchip sales office (see last page) when contacting a sales office, please spec ify which device, revision of silicon and data sheet (include literature number) you are using. customer notification system register on our web site at www.microchip.com to receive the most current information on all of our products.
? 2009-2012 microchip technology inc. ds70591e-page 15 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 referenced sources this device data sheet is based on the following individual chapters of the ?dspic33f/pic24h family reference manual? . these documents should be considered as the primary re ference for the operation of a particular module or device feature. ? section 2. ?cpu? (ds70204) ? section 3. ?data memory? (ds70202) ? section 4. ?program memory? (ds70203) ? section 5. ?flash programming? (ds70191) ? section 8. ?reset? (ds70192) ? section 9. ?watchdog timer and power-saving modes? (ds70196) ? section 10. ?i/o ports? (ds70193) ? section 11. ?timers? (ds70205) ? section 12. ?input capture? (ds70198) ? section 13. ?output compare? (ds70209) ? section 15. ?quadrature encoder interface (qei)? (ds70208) ? section 16. ?analog-to-digital converter (adc)? (ds70183) ? section 17. ?uart? (ds70188) ? section 18. ?serial periph eral interface (spi)? (ds70206) ? section 19. ?inter-integrated circuit? (i 2 c?)? (ds70195) ? section 21. ?enhanced controller area network (ecan?)? (ds70185) ? section 22. ?direct memory access (dma)? (ds70182) ? section 23. ?codeguard security? (ds70199) ? section 24. ?programming and diagnostics? (ds70207) ? section 25. ?device configuration? (ds70194) ? section 26. ?development tool support? (ds70200) ? section 42. ?oscillator (part iv)? (ds70307) ? section 43. ?high-speed pwm? (ds70323) ? section 44. ?high-speed 10-bit an alog-to-digital converter (adc)? (ds70321) ? section 45. ?high-speed analog comparator? (ds70296) ? section 47. ?interrupts (part v)? (ds70597) note 1: to access the documents listed below, browse to the documentation section of the dspic33fj64gs610 product page of the microchip web site ( www.microchip.com ) to select a family reference manual section from the following list. in addition to parameters, features, and other documentation, the resulting page provides links to the related family reference manual sections.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 16 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 17 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 1.0 device overview this document contains devic e-specific information for the following dspic33f digital signal controller (dsc) devices: ? dspic33fj32gs406 ? dspic33fj32gs606 ? dspic33fj32gs608 ? dspic33fj32gs610 ? dspic33fj64gs406 ? DSPIC33FJ64GS606 ? dspic33fj64gs608 ? dspic33fj64gs610 the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/6 06/608/610 families of devices contain extensive digital signal processor (dsp) functionality with a high-performance 16-bit microcontroller (mcu) architecture. figure 1-1 shows a general block diagram of the core and peripheral modules in the dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 devices. ta b l e 1 - 1 lists the functions of the various pins shown in the pinout diagrams. note: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the la test sections in the ?dspic33f/pic24h family reference manual? , which are available from the microchip web site ( www.microchip.com ).
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 18 ? 2009-2012 microchip technology inc. figure 1-1: device block diagram 16 osc1/clki osc2/clko v dd , v ss timing generation mclr power-up timer oscillator start-up timer power-on reset watchdog timer brown-out reset frc/lprc oscillators regulator voltage v cap ic1-4 i2c1/2 porta instruction decode and control pch pcl 16 program counter 16-bit alu 23 23 24 23 instruction reg pcu 16 x 16 w register array rom latch 16 ea mux 16 16 8 interrupt controller psv and table data access control block stack control logic loop control logic address latch program memory data latch literal data 16 16 16 16 data latch address latch 16 x ram 16 y data bus x data bus dsp engine divide support 16 control signals to various blocks adc1 timers portb address generator units 1-5 cnx uart1/2 pwm 9 x 2 portc spi1,2 oc1-4 analog comparator 1-4 note: not all pins or features are implemented on all device pinout co nfigurations. see pinout diagrams for the specific pins and fea tures present on each device. ecan1 qei1,2 portd porte portf portg dma dma ram controller 16 16 data latch address latch y ram
? 2009-2012 microchip technology inc. ds70591e-page 19 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 1-1: pinout i/o descriptions pin name pin type buffer type description an0-an23 i analog analog input channels. clki clko i o st/cmos ? external clock source input. alwa ys associated with osc1 pin function. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. optionally functions as clko in rc and ec modes. always associated with osc2 pin function. osc1 osc2 i i/o st/cmos ? oscillator crystal input. st buffer when configured in rc mode; cmos otherwise. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. optionally functions as clko in rc and ec modes. sosci sosco i o st/cmos ? 32.768 khz low-power oscillator crystal input; cmos otherwise. 32.768 khz low-power oscillator crystal output. cn0-cn23 i st change notification inputs. can be software programmed for internal weak pull-ups on all inputs. c1rx c1tx i o st ? ecan1 bus receive pin. ecan1 bus transmit pin. ic1-ic4 i st capture inputs 1 through 4. indx1, indx2, aindx1 qea1, qea2, aqea1 qeb1, qeb2, aqeb1 updn1 i i i o st st st cmos quadrature encoder index pulse input. quadrature encoder phase a input in qei mode. auxiliary timer external clo ck/gate input in timer mode. quadrature encoder phase a input in qei mode. auxiliary timer external clo ck/gate input in timer mode. position up/down counter direction state. ocfa oc1-oc4 i o st ? compare fault a input (for compare channels 1 and 2). compare outputs 1 through 4. int0 int1 int2 int3 int4 i i i i i st st st st st external interrupt 0. external interrupt 1. external interrupt 2. external interrupt 3. external interrupt 4. ra0-ra15 i/o st porta is a bidirectional i/o port. rb0-rb15 i/o st portb is a bidirectional i/o port. rc0-rc15 i/o st portc is a bidirectional i/o port. rd0-rd15 i/o st portd is a bidirectional i/o port. re0-re9 i/o st porte is a bidirectional i/o port. rf0-rf13 i/o st portf is a bidirectional i/o port. rg0-rg15 i/o st portg is a bidirectional i/o port. t1ck t2ck t3ck t4ck t5ck i i i i i st st st st st timer1 external clock input. timer2 external clock input. timer3 external clock input. timer4 external clock input. timer5 external clock input. legend: cmos = cmos compatible input or output analog = analog input i = input st = schmitt trigger input with cmos levels p = power o = output ttl = transistor-transistor logic
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 20 ? 2009-2012 microchip technology inc. u1cts u1rts u1rx u1tx u2cts u2rts u2rx u2tx i o i o i o i o st ? st ? st ? st ? uart1 clear-to-send. uart1 ready-to-send. uart1 receive. uart1 transmit. uart2 clear-to-send. uart2 ready-to-send. uart2 receive. uart2 transmit. sck1 sdi1 sdo1 ss1 , ass1 sck2 sdi2 sdo2 ss2 i/o i o i/o i/o i o i/o st st ? st st st ? st synchronous serial clo ck input/output for spi1. spi1 data in. spi1 data out. spi1 slave synchronization or frame pulse i/o. synchronous serial clo ck input/output for spi2. spi2 data in. spi2 data out. spi2 slave synchronization or frame pulse i/o. scl1 sda1 scl2 sda2 i/o i/o i/o i/o st st st st synchronous serial clock input/output for i2c1. synchronous serial data input/output for i2c1. synchronous serial clock input/output for i2c2. synchronous serial data input/output for i2c2. tms tck tdi tdo i i i o ttl ttl ttl ? jtag test mode select pin. jtag test clock input pin. jtag test data input pin. jtag test data output pin. cmp1a cmp1b cmp1c cmp1d cmp2a cmp2b cmp2c cmp2d cmp3a cmp3b cmp3c cmp3d cmp4a cmp4b cmp4c cmp4d i i i i i i i i i i i i i i i i analog analog analog analog analog analog analog analog analog analog analog analog analog analog analog analog comparator 1 channel a. comparator 1 channel b. comparator 1 channel c. comparator 1 channel d. comparator 2 channel a comparator 2 channel b. comparator 2 channel c. comparator 2 channel d. comparator 3 channel a. comparator 3 channel b. comparator 3 channel c. comparator 3 channel d. comparator 4 channel a. comparator 4 channel b. comparator 4 channel c. comparator 4 channel d. dacout o ? dac output voltage. extref i analog external voltage reference input for the reference dacs. refclk o ? refclk output signal is a post scaled derivative of the system clock. table 1-1: pinout i/o descriptions (continued) pin name pin type buffer type description legend: cmos = cmos compatible input or output analog = analog input i = input st = schmitt trigger input with cmos levels p = power o = output ttl = transistor-transistor logic
? 2009-2012 microchip technology inc. ds70591e-page 21 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 flt1-flt23 synci1-synci4 synco1-synco2 pwm1l pwm1h pwm2l pwm2h pwm3l pwm3h pwm4l pwm4h pwm5l pwm5h pwm6l pwm6h pwm7l pwm7h pwm8l pwm8h pwm9l pwm9h i i o o o o o o o o o o o o o o o o o o o st st ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? fault inputs to pwm module. external synchronization signal to pwm master time base. pwm master time base for external device synchronization. pwm1 low output. pwm1 high output. pwm2 low output. pwm2 high output. pwm3 low output. pwm3 high output. pwm4 low output. pwm4 high output. pwm5 low output. pwm5 high output. pwm6 low output. pwm6 high output. pwm7 low output. pwm7 high output. pwm8 low output. pwm8 high output. pwm9 low output. pwm9 high output. pged1 pgec1 pged2 pgec2 pged3 pgec3 i/o i i/o i i/o i st st st st st st data i/o pin for programming/debugging communication channel 1. clock input pin for programming/debugging communication channel 1. data i/o pin for programming/debugging communication channel 2. clock input pin for programming/debugging communication channel 2. data i/o pin for programming/debugging communication channel 3. clock input pin for programming/debugging communication channel 3. mclr i/p st master clear (reset) input. this pin is an active-low reset to the device. avdd p p positive supply for analog modules. avss p p ground reference for analog modules. v dd p ? positive supply for peripheral logic and i/o pins. v cap p ? cpu logic filter capacitor connection. v ss p ? ground reference for logic and i/o pins. table 1-1: pinout i/o descriptions (continued) pin name pin type buffer type description legend: cmos = cmos compatible input or output analog = analog input i = input st = schmitt trigger input with cmos levels p = power o = output ttl = transistor-transistor logic
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 22 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 23 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 2.0 guidelines for getting started with 16-bit digital signal controllers 2.1 basic connection requirements getting started with the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/ 610 family of 16-bit digital signal controllers (dsc) requires attention to a minimal set of device pin connections before proceeding with development. the following is a list of pin names, which must always be connected: ? all v dd and v ss pins (see section 2.2 ?decoupling capacitors? ) ? all av dd and av ss pins (regardless if adc module is not used) (see section 2.2 ?decoupling capacitors? ) ?v cap (see section 2.3 ?capacitor on internal voltage regulator (v cap )? ) ?mclr pin (see section 2.4 ?master clear (mclr) pin? ) ? pgecx/pgedx pins used for in-circuit serial programming? (icsp?) and debugging purposes (see section 2.5 ?icsp pins? ) ? osc1 and osc2 pins when external oscillator source is used (see section 2.6 ?externa l oscillator pins? ) 2.2 decoupling capacitors the use of decoupling capacitors on every pair of power supply pins, such as v dd , v ss , av dd , and av ss is required. consider the following criteria when using decoupling capacitors: ? value and type of capacitor: recommendation of 0.1 f (100 nf), 10-20v. this capacitor should be a low-esr and have resonance frequency in the range of 20 mhz and higher. it is recommended that ceramic capacitors be used. ? placement on the printed circuit board: the decoupling capacitors should be placed as close to the pins as possible. it is recommended to place the capacitors on the same side of the board as the device. if space is constricted, the capacitor can be placed on another layer on the pcb using a via; however, ensure that the trace length from the pin to the capacitor is within one-quarter inch (6 mm) in length. ? handling high-frequency noise: if the board is experiencing high-frequency noise, upward of tens of mhz, add a second ceramic-type capacitor in par- allel to the above described decoupling capacitor. the value of the second capacitor can be in the range of 0.01 f to 0.001 f. place this second capacitor next to the prim ary decoupling capacitor. in high-speed circuit designs, consider implement- ing a decade pair of capacitances as close to the power and ground pins as possible. for example, 0.1 f in parallel with 0.001 f. ? maximizing performance: on the board layout from the power supply circuit, run the power and return traces to the decoupling capacitors first, and then to the device pins. this ensures that the decoupling capacitors are first in the power chain. equally important is to keep the trace length between the capacitor and the power pins to a minimum, thereby reducing pcb track inductance. note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33f/pic24h family reference manual? . please see the microchip web site ( www.microchip.com ) for the latest dspic33f/pic24h family reference manual sections. 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 24 ? 2009-2012 microchip technology inc. figure 2-1: recommended minimum connection 2.2.1 tank capacitors on boards with power traces running longer than six inches in length, it is suggested to use a tank capacitor for integrated circuits including dscs to supply a local power source. the value of the tank capacitor should be determined based on the trace resistance that con- nects the power supply sour ce to the device, and the maximum current drawn by the device in the applica- tion. in other words, select the tank capacitor so that it meets the acceptable voltage sag at the device. typical values range from 4.7 f to 47 f. 2.3 capacitor on internal voltage regulator (v cap ) a low-esr (< 0.5 ohms) capacitor is required on the v cap pin, which is used to stabilize the voltage regulator output voltage. the v cap pin must not be connected to v dd , and must have a minimum capacitor 22 f, 16v connected to ground. the type can be ceramic or tantalum. refer to section 27.0 ?electrical characteristics? for additional information. the placement of this capacitor should be close to the v cap . it is recommended that the trace length not exceed one-quarter inch (6 mm). refer to section 24.2 ?on-chip voltage regulator? for details. 2.4 master clear (mclr ) pin the mclr pin provides for two specific device functions: ? device reset ? device programming and debugging during device programming and debugging, the resistance and capacitance that can be added to the pin must be considered. device programmers and debuggers drive the mclr pin. consequently, specific voltage levels (v ih and v il ) and fast signal transitions must not be adve rsely affected. therefore, specific values of r and c will need to be adjusted based on the application and pcb requirements. for example, as shown in figure 2-2 , it is recommended that the capaci tor c, be isolated from the mclr pin during programming and debugging operations. place the components shown in figure 2-2 within one-quarter inch (6 mm) from the mclr pin. figure 2-2: example of mclr pin connections ( 1 , 2 ) dspic33f v dd v ss v dd v ss v ss v dd av dd av ss v dd v ss 0.1 f ceramic 0.1 f ceramic 0.1 f ceramic 0.1 f ceramic c r v dd mclr 0.1 f ceramic v cap l1 (1) r1 10 f tantalum note 1: as an option, instead of a hard-wired connection, an inductor (l1) can be substituted between v dd and av dd to improve adc noise rejection. the inductor impedance should be less than 1 ? and the inductor capacity greater than 10 ma. where: f f cnv 2 ------------- - = f 1 2 ? lc ?? ----------------------- = l 1 2 ? fc ?? --------------------- - ?? ?? 2 = (i.e., adc conversion rate/2) note 1: r ? 10 k ? is recommended. a suggested starting value is 10 k ? . ensure that the mclr pin v ih and v il specifications are met. 2: r1 ? 470 ? will limit any current flowing into mclr from the external capacitor c, in the event of mclr pin breakdown, due to electrostatic discharge (esd) or electrical overstress (eos). ensure that the mclr pin v ih and v il specifications are met. c r1 r v dd mclr dspic33f jp
? 2009-2012 microchip technology inc. ds70591e-page 25 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 2.5 icsp pins the pgecx and pgedx pins are used for in-circuit serial programming? (icsp?) and debugging pur- poses. it is recommended to keep the trace length between the icsp connector and the icsp pins on the device as short as possible. if the icsp connector is expected to experience an esd event, a series resistor is recommended, with the value in the range of a few tens of ohms, not to exceed 100 ohms. pull-up resistors, series diodes, and capacitors on the pgecx and pgedx pins are not recommended as they will interfere with the programmer/debugger communi- cations to the device. if such discrete components are an application requirement, they should be removed from the circuit during programming and debugging. alternatively, refer to t he ac/dc characteristics and timing requirements information in the respective device flash programming spec ification for information on capacitive loading limits and pin input voltage high (v ih ) and input low (v il ) requirements. ensure that the ?communication channel select? (i.e., pgecx/pgedx pins) programmed into the device matches the physical con nections for the icsp to mplab ? icd 3 or mplab real ice?. for more information on icd 3 and real ice connection requirements, refer to the following documents that are available on the microchip web site. ? ?using mplab ? icd 3? (poster) (ds51765) ? ?mplab ? icd 3 design advisory? (ds51764) ? ?mplab ? real ice? in-circuit debugger user?s guide? ( ds51616) ? ?using mplab ? real ice?? (poster) (ds51749) 2.6 external oscillator pins many dscs have options for at least two oscillators: a high-frequency primary oscillator and a low-frequency secondary oscillator (refer to section 9.0 ?oscillator configuration? for details). the oscillator circuit should be placed on the same side of the board as the device. also, place the oscillator circuit close to t he respective oscillator pins, not exceeding one-half inch (12 mm) distance between them. the load capacitors should be placed next to the oscillator itself, on the same side of the board. use a grounded copper pour around the oscillator circuit to isolate them from surrounding circuits. the grounded copper pour should be routed directly to the mcu ground. do not run any signal traces or power traces inside the ground pour. also, if using a two-sided board, avoid any traces on the other side of the board wher e the crystal is placed. a suggested layout is shown in figure 2-3 . figure 2-3: suggested placement of the oscillator circuit 13 main oscillator guard ring guard trace secondary oscillator 14 15 16 17 18 19 20
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 26 ? 2009-2012 microchip technology inc. 2.7 oscillator value conditions on device start-up if the pll of the target device is enabled and configured for the device start-up oscillator, the maximum oscillator source frequency must be limited to 4 mhz < f in < 8 mhz to comply with device pll start-up conditions. this means that if the external oscillator frequency is outside this range, the application must start-up in the frc mode first. the default pll settings after a por with an oscillator frequency outside this range will violate the device operating speed. once the device powers up, the application firmware can initialize the pll sfrs, clkdiv, and plldbf to a suitable value, and then perform a clock switch to the oscillator + pll clock source . note that clock switching must be enabled in the device configuration word. 2.8 configuration of analog and digital pins during icsp operations if mplab icd 3 or real ice is selected as a debugger, it automatically initializes all of the analog-to-digital input pins (anx) as ?digital? pins, by setting all bits in the adpcfg and adpcfg2 registers. the bits in the registers that correspond to the analog-to-digital pins that are initialized by mplab icd 2, icd 3, or real ice, must not be cleared by the user application firmware; otherwise, communication errors will result between the debugger and the device. if your application needs to use certain analog-to-digital pins as analog input pins during the debug session, the user application must clear the corresponding bits in the adpcfg and adpcfg2 registers during initialization of the adc module. when mplab icd 3 or real ice is used as a programmer, the user application firmware must correctly configure th e adpcfg and adpcfg2 registers. automatic initiali zation of these registers is only done during debugger operation. failure to correctly configure the register(s) will result in all analog-to-digital pins being recognized as analog input pins, resulting in the port value being read as a logic ? 0 ?, which may affect user a pplication functionality. 2.9 unused i/os unused i/o pins should be configured as outputs and driven to a logic low state. alternatively, connect a 1k to 10k resistor between v ss and unused pins and drive the output to logic low. 2.10 typical application connection examples examples of typical application connections are shown in figure 2-4 through figure 2-11 .
? 2009-2012 microchip technology inc. ds70591e-page 27 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 2-4: digital pfc figure 2-5: boost converter implementation v ac i pfc v hv _ bus adc channel adc channel adc channel pwm |v ac | k 1 k 2 k 3 fet dspic33fj32gs406 driver output i pfc v output adc channel adc adc channel pwm k 1 k 2 k 3 fet dspic33fj32gs406 v input channel output driver
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 28 ? 2009-2012 microchip technology inc. figure 2-6: single-phase synchronous buck converter figure 2-7: multi-phase synchronous buck converter k 1 analog comp. k 2 k 7 pwm pwm adc channel adc channel 5v output i 5v 12v input dspic33fj32gs606 fet driver k 5 k 4 k 3 k 7 analog comparator analog comparator adc channel analog comparator adc channel pwm pwm pwm pwm pwm pwm 3.3v output 12v input fet driver fet driver fet driver dspic33fj32gs608 k 6
? 2009-2012 microchip technology inc. ds70591e-page 29 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 2-8: off-line ups adc adc adc adc adc pwm pwm pwm dspic33fj64gs610 pwm pwm pwm fet driver fet driver k 2 k 1 fet driver fet driver fet driver fet driver k 4 k 5 v bat gnd + v out + v out - full-bridge inverter push-pull converter v dc gnd fet driver adc pwm k 3 k 6 or analog comp. battery charger +
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 30 ? 2009-2012 microchip technology inc. figure 2-9: interleaved pfc v ac v out + adc channel pwm adc pwm |v ac | k 4 k 3 fet dspic33fj32gs608 driver v out - adc channel fet driver adc k 1 k 2 channel channel adc channel
? 2009-2012 microchip technology inc. ds70591e-page 31 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 2-10: phase-shifted full-bridge converter v in + v in - s1 gate 4 gate 2 gate 3 gate 1 analog ground v out + v out - k 2 fet driver k 1 fet driver fet driver gate 1 gate 2 s1 gate 3 gate 4 s3 s3 gate 6 gate 5 gate 6 gate 5 dspic33fj32gs606 pwm pwm adc channel pwm adc channel
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 32 ? 2009-2012 microchip technology inc. figure 2-11: ac-to-dc power supply with pfc and three outputs (12v, 5v, and 3.3v) k 4 i zvt v hv _ bus v out isolation barrier fet driver fet driver fet driver k 6 analog comp. uart tx k 10 k 7 k 9 k 8 k 11 k 5 pwm pwm adc channel analog comparator analog comparator adc channel analog comparator adc channel pwm pwm pwm pwm pwm pwm 3.3v output 5v output i 5v 12v input fet driver fet driver fet driver fet driver i 3.3v_3 i 3.3v_2 i 3.3v_1 dspic33fj64gs610 v ac i pfc v hv _ bus |v ac | k 1 k 2 k 3 fet driver pfc stage 3.3v multi-phase buck stage zvt with current doubler synchronous rectifier 5v buck stage secondary controller adc channel pwm uart rx pwm pwm adc channel pwm pwm pwm dspic33fj64gs610 adc ch. adc ch. pwm output adc ch. primary controller
? 2009-2012 microchip technology inc. ds70591e-page 33 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 3.0 cpu the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 cpu module has a 16-bit (data) modified harvard architecture with an enhanced instruction set, in cluding significant support for dsp. the cpu has a 24-bit instruction word with a variable length opcode field. the program counter (pc) is 23 bits wide and addresses up to 4m x 24 bits of user program memory sp ace. the actual amount of program memory implemented varies from device to device. a single-cycle instru ction prefetch mechanism is used to help maintain throughput and provides pre- dictable execution. all instru ctions execute in a single cycle, with the exception of instructions that change the program flow, the double-word move ( mov.d ) instruction and the table instructions. overhead-free program loop constructs are supported using the do and repeat instructions, both of which are interruptible at any point. the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608 /610 devices have six- teen, 16-bit working registers in the programmer?s model. each of the working registers can serve as a data, address or address offset register. the sixteenth working register (w15) operates as a software stack pointer (sp) for interrupts and calls. there are two classes of instruction in the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608 /610 devices: mcu and dsp. these two instructio n classes are seamlessly integrated into a single cpu. the instruction set includes many addressing modes and is designed for optimum c compiler efficiency. for most instructions, the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/6 10 is capable of exe- cuting a data (or program data) memory read, a work- ing register (data) read, a data memory write and a program (instruction) memory read per instruction cycle. as a result, three pa rameter instructions can be supported, allowing a + b = c operations to be executed in a single cycle. a block diagram of the cpu is shown in figure 3-1 , and the programmer?s model for the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/ 608/610 is shown in figure 3-2 . 3.1 data addressing overview the data space can be addressed as 32k words or 64 kbytes and is split into two blocks, referred to as x and y data memory. each memory block has its own independent address generation unit (agu). the mcu class of instructions operates solely through the x memory agu, wh ich accesses the entire memory map as one linear data space. certain dsp instructions operate thro ugh the x and y agus to support dual operand reads, which splits the data address space into two parts. the x and y data space boundary is device-specific. overhead-free circular buffers (modulo addressing mode) are supported in both x and y address spaces. the modulo addressing removes the software boundary checking overhead for dsp algorithms. furthermore, the x agu circular addressing can be used with any of the mcu class of instructions. the x agu also supports bit-reversed addressing to greatly simplify input or output data reordering for radix-2 fft algorithms. the upper 32 kbytes of the data space memory map can optionally be mapped into program space at any 16k program word boundary defined by the 8-bit program space visibility page (psvpag) register. the program-to-data space mapping feature lets any instruction access program space as if it were data space. 3.2 dsp engine overview the dsp engine features a hi gh-speed, 17-bit by 17-bit multiplier, a 40-bit alu, two 40-bit saturating accumulators and a 40-bit bidirectional barrel shifter. the barrel shifter is capable of shifting a 40-bit value up to 16 bits, right or left, in a single cycle. the dsp instructions operate seamlessly with all other instructions and have been designed for optimal real- time performance. the mac instruction and other asso- ciated instructions can concurrently fetch two data operands from memory while multiplying two w registers and accumulating and optionally saturating the result in the same cycle. this instruction functionality requires that the ram data space be split for these instructions and linear for all others. data space partitioning is achieved in a transparent and flexible manner through dedicating certain working registers to each address space. note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 2. ?cpu? (ds70204) in the ? dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 34 ? 2009-2012 microchip technology inc. 3.3 special mcu features the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 features a 17-bit by 17-bit single-cycle multip lier that is shared by both the mcu alu and dsp engine. the multiplier can per- form signed, unsigned and mixed sign multiplication. using a 17-bit by 17-bit multiplier for 16-bit by 16-bit multiplication not only allows you to perform mixed sign multiplication, it also achi eves accurate results for special operations, such as (-1.0) x (-1.0). the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 supports 16/16 and 32/16 divide operations, both fractional and inte- ger. all divide instructions are iterative operations. they must be executed within a repeat loop, resulting in a total execution time of 19 instruction cycles. the divide operation can be interrupt ed during any of those 19 cycles without loss of data. a 40-bit barrel shifter is used to perform up to a 16-bit left or right shift in a sing le cycle. the barrel shifter can be used by both mcu and dsp instructions. figure 3-1: dspic33fj32gs406/606/608/61 0 and dspic33fj64gs406/606/608/610 cpu core block diagram instruction decode and control pch pcl program counter 16-bit alu 24 23 instruction reg pcu rom latch ea mux interrupt controller stack control logic loop control logic data latch address latch control signals to various blocks literal data 16 16 16 to peripheral modules data latch address latch 16 x ram y ram address generator units 16 y data bus x data bus dsp engine divide support 16 16 23 23 16 8 psv and table data access control block 16 16 16 16 program memory data latch address latch 16 x 16 w register array
? 2009-2012 microchip technology inc. ds70591e-page 35 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 3-2: programmer?s model pc22 pc0 7 0 d0 d15 program counter data table page address status register working registers dsp operand registers w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12/dsp offset w13/dsp write back w14/frame pointer w15/stack pointer dsp address registers ad39 ad0 ad31 dsp accumulators acca accb 7 0 program space visibi lity page address z 0 oa ob sa sb rcount 15 0 repeat loop counter dcount 15 0 do loop counter dostart 22 0 do loop start address ipl2 ipl1 splim stack pointer limit register ad15 srl push.s shadow do shadow oab sab 15 0 core configuration register legend corcon da dc ra n tblpag psvpag ipl0 ov w0/wreg srh do loop end address doend 22 c
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 36 ? 2009-2012 microchip technology inc. 3.4 cpu control registers register 3-1: sr: cpu status register r-0 r-0 r/c-0 r/c-0 r-0 r/c-0 r-0 r/w-0 oa ob sa ( 1 ) sb ( 1 ) oab sab ( 1 , 4 ) da dc bit 15 bit 8 r/w-0 ( 3 ) r/w-0 ( 3 ) r/w-0 ( 3 ) r-0 r/w-0 r/w-0 r/w-0 r/w-0 ipl<2:0> ( 2 ) ra n ov z c bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 oa: accumulator a overflow status bit 1 = accumulator a overflowed 0 = accumulator a has not overflowed bit 14 ob: accumulator b overflow status bit 1 = accumulator b overflowed 0 = accumulator b has not overflowed bit 13 sa: accumulator a saturation ?sticky? status bit ( 1 ) 1 = accumulator a is saturated or has been saturated at some time 0 = accumulator a is not saturated bit 12 sb: accumulator b saturation ?sticky? status bit ( 1 ) 1 = accumulator b is saturated or has been saturated at some time 0 = accumulator b is not saturated bit 11 oab: oa || ob combined accumu lator overflow status bit 1 = accumulators a or b have overflowed 0 = neither accumulators a or b have overflowed bit 10 sab: sa || sb combined accumula tor ?sticky? status bit ( 1 , 4 ) 1 = accumulators a or b are saturated or hav e been saturated at some time in the past 0 = neither accumulator a or b are saturated bit 9 da: do loop active bit 1 = do loop in progress 0 = do loop not in progress bit 8 dc: mcu alu half carry/borrow bit 1 = a carry-out from the 4th low-order bit (for byte-s ized data) or 8th low-order bit (for word-sized data) of the result occurred 0 = no carry-out from the 4th low-order bit (for by te-sized data) or 8th low- order bit (for word-sized data) of the result occurred note 1: this bit can be read or cleared (not set). 2: the ipl<2:0> bits are concatenated with the ipl<3> bi t (corcon<3>) to form the cpu interrupt priority level (ipl). the value in parenthes es indicates the ipl if ipl<3> = 1 . user interrupts are disabled when ipl<3> = 1 . 3: the ipl<2:0> status bits are read-only when nstdis = 1 (intcon1<15>). 4: clearing this bit will clear sa and sb.
? 2009-2012 microchip technology inc. ds70591e-page 37 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 7-5 ipl<2:0>: cpu interrupt priority level status bits ( 2 , 3 ) 111 = cpu interrupt priority level is 7 (15), user interrupts disabled 110 = cpu interrupt priority level is 6 (14) 101 = cpu interrupt priority level is 5 (13) 100 = cpu interrupt priority level is 4 (12) 011 = cpu interrupt priority level is 3 (11) 010 = cpu interrupt priority level is 2 (10) 001 = cpu interrupt priority level is 1 (9) 000 = cpu interrupt priority level is 0 (8) bit 4 ra: repeat loop active bit 1 = repeat loop in progress 0 = repeat loop not in progress bit 3 n: mcu alu negative bit 1 = result was negative 0 = result was non-negative (zero or positive) bit 2 ov: mcu alu overflow bit this bit is used for signed arithmetic (2?s complement). it indicates an overflow of a magnitude that causes the sign bit to change state. 1 = overflow occurred for signed arit hmetic (in this arithmetic operation) 0 = no overflow occurred bit 1 z: mcu alu zero bit 1 = an operation that affects the z bit has set it at some time in the past 0 = the most recent operation that affects the z bit has cleared it (i.e., a non-zero result) bit 0 c: mcu alu carry/borrow bit 1 = a carry-out from the most signi ficant bit of the result occurred 0 = no carry-out from the most sign ificant bit of the result occurred register 3-1: sr: cpu status register (continued) note 1: this bit can be read or cleared (not set). 2: the ipl<2:0> bits are concatenated with the ipl<3> bi t (corcon<3>) to form the cpu interrupt priority level (ipl). the value in parenthes es indicates the ipl if ipl<3> = 1 . user interrupts are disabled when ipl<3> = 1 . 3: the ipl<2:0> status bits are read-only when nstdis = 1 (intcon1<15>). 4: clearing this bit will clear sa and sb.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 38 ? 2009-2012 microchip technology inc. register 3-2: corcon: core control register u-0 u-0 u-0 r/w-0 r/w-0 r-0 r-0 r-0 ? ? ?usedt ( 1 ) dl<2:0> bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-0 r/c-0 r/w-0 r/w-0 r/w-0 sata satb satdw accsat ipl3 ( 2 ) psv rnd if bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 12 us: dsp multiply unsigned/signed control bit 1 = dsp engine multiplies are unsigned 0 = dsp engine multiplies are signed bit 11 edt: early do loop termination control bit ( 1 ) 1 = terminate executing do loop at end of current loop iteration 0 = no effect bit 10-8 dl<2:0>: do loop nesting level status bits 111 = 7 do loops active ? ? ? 001 = 1 do loop active 000 = 0 do loops active bit 7 sata: acca saturation enable bit 1 = accumulator a saturation enabled 0 = accumulator a saturation disabled bit 6 satb: accb saturation enable bit 1 = accumulator b saturation enabled 0 = accumulator b saturation disabled bit 5 satdw: data space write from dsp engine saturation enable bit 1 = data space write saturation enabled 0 = data space write saturation disabled bit 4 accsat: accumulator saturation mode select bit 1 = 9.31 saturation (super saturation) 0 = 1.31 saturation (normal saturation) bit 3 ipl3: cpu interrupt priority level status bit 3 ( 2 ) 1 = cpu interrupt priority level is greater than 7 0 = cpu interrupt priority level is 7 or less bit 2 psv: program space visibility in data space enable bit 1 = program space visible in data space 0 = program space not visible in data space bit 1 rnd: rounding mode select bit 1 = biased (conventional) rounding enabled 0 = unbiased (convergent) rounding enabled bit 0 if: integer or fractional multiplier mode select bit 1 = integer mode enabled for dsp multiply ops 0 = fractional mode enabled for dsp multiply ops note 1: this bit will always read as ? 0 ?. 2: the ipl3 bit is concatenated with t he ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level.
? 2009-2012 microchip technology inc. ds70591e-page 39 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 3.5 arithmetic logic unit (alu) the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 alu is 16 bits wide and is capable of addition, subtraction, bit shifts and logic operations. unless otherwise mentioned, arithmetic operations are 2?s complement in nature. depending on the operation, the alu can affect the values of the carry (c), zero (z), negative (n), overflow (ov) and digit carry (dc) status bits in the sr register. the c and dc status bits operate as borrow and digit borrow bits, respectively, for subtraction operations. the alu can perform 8-bit or 16-bit operations, depending on the mode of t he instruction that is used. data for the alu operation can come from the w register array or data memory, depending on the addressing mode of the instruction. likewise, output data from the alu can be writte n to the w register array or a data memory location. refer to the ? 16-bit mcu and dsc programmer?s _reference manual ? (ds70157) for in formation on the sr bits affected by each instruction. the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 cpu incorporates hardware support for both multiplication and division. this includes a dedicated hardware multiplier and support hardware for 16-bit divisor division. 3.5.1 multiplier using the high-speed, 17-bit x 17-bit multiplier of the dsp engine, the alu supports unsigned, signed or mixed sign operation in several mcu multiplication modes: ? 16-bit x 16-bit signed ? 16-bit x 16-bit unsigned ? 16-bit signed x 5-bit (literal) unsigned ? 16-bit unsigned x 16-bit unsigned ? 16-bit unsigned x 5-bit (literal) unsigned ? 16-bit unsigned x 16-bit signed ? 8-bit unsigned x 8-bit unsigned 3.5.2 divider the divide block supports 32- bit/16-bit and 16-bit/16-bit signed and unsigned integer divide operations with the following data sizes: ? 32-bit signed/16-bit signed divide ? 32-bit unsigned/16-bit unsigned divide ? 16-bit signed/16-bit signed divide ? 16-bit unsigned/16-bit unsigned divide the quotient for all divide instructions ends up in w0 and the remainder in w1. 16-bit signed and unsigned div instructions can specify any w register for both the 16-bit divisor (wn) and any w register (aligned) pair (w(m + 1):wm) for the 32-bit dividend. the divide algorithm takes one cycle per bit of divisor, so both 32-bit/ 16-bit and 16-bit/16-bit instructions take the same number of cycles to execute. 3.6 dsp engine the dsp engine consists of a high-speed, 17-bit x 17-bit multiplier, a barrel shifter and a 40-bit adder/ subtracter (with two target accumulators, round and saturation logic). the dspic33fj32gs406/606/608/610 and dspic33fj64gs 406/606/608/610 is a single-cycle instruction flow architectu re; therefore, concurrent operation of the dsp engine with mcu instruction flow is not possible. however, some mcu alu and dsp engine resources can be used concurrently by the same instruction (for example, ed, edac). the dsp engine can also perform inherent accumulator-to-accumulator operations that require no additional data. these instructions are add, sub and neg . the dsp engine has options selected through bits in the cpu core control register (corcon), as listed below: ? fractional or integer dsp multiply (if) ? signed or unsigned dsp multiply (us) ? conventional or convergent rounding (rnd) ? automatic saturation on/off for acca (sata) ? automatic saturation on/off for accb (satb) ? automatic saturation on/off for writes to data memory (satdw) ? accumulator saturati on mode selection (accsat) a block diagram of the dsp engine is shown in figure 3-3 . table 3-1: dsp instructions summary instruction algebraic operation acc write back clr a = 0 yes ed a = (x ? y) 2 no edac a = a + (x ? y) 2 no mac a = a + (x * y) yes mac a = a + x 2 no movsac no change in a yes mpy a = x * y no mpy a = x 2 no mpy.n a = ? x * y no msc a = a ? x * y yes
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 40 ? 2009-2012 microchip technology inc. figure 3-3: dsp engine block diagram zero backfill sign-extend barrel shifter 40-bit accumulator a 40-bit accumulator b round logic x data bus to / f r o m w a r r a y adder saturate negate 32 32 33 16 16 16 16 40 40 40 40 s a t u r a t e y data bus 40 carry/borrow out carry/borrow in 16 40 multiplier/scaler 17-bit
? 2009-2012 microchip technology inc. ds70591e-page 41 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 3.6.1 multiplier the 17-bit x 17-bit multiplier is capable of signed or unsigned operation and can multiplex its output using a scaler to support either 1.31 fractional (q31) or 32-bit integer results. unsigned operands are zero-extended into the 17th bit of the multiplier input value. signed operands are sign-extended into the 17th bit of the multiplier input value. the ou tput of the 17-bit x 17-bit multiplier/scaler is a 33-bit value that is sign-extended to 40 bits. integer data is inherently represented as a signed 2?s complement value, where the most significant bit (msb) is defined as a sign bit. the range of an n-bit 2?s complement integer is -2 n-1 to 2 n-1 ? 1. ? for a 16-bit integer, the data range is -32768 (0x8000) to 32767 (0x7fff) including 0. ? for a 32-bit integer, the data range is -2,147,483,648 (0x8000 0000) to 2,147,483,647 (0x7fff ffff). when the multiplier is configured for fractional multiplication, the data is represented as a 2?s complement fraction, where the msb is defined as a sign bit and the radix point is implied to lie just after the sign bit (qx format). the range of an n-bit 2?s complement fraction with this implied radix point is -1.0 to (1 ? 2 1-n ). for a 16-bit fraction, the q15 data range is -1.0 (0x8000) to 0.999969482 (0x7fff) including 0 and has a precision of 3.01518x10 -5 . in fractional mode, the 16 x 16 multiply operation generates a 1.31 product that has a pr ecision of 4.65661 x 10 -10 . the same multiplier is used to support the mcu multiply instructions, which include integer 16-bit signed, unsigned and mixed sign multiply operations. the mul instruction can be directed to use byte or word-sized operands. byte operands will direct a 16-bit result, and word operands will direct a 32-bit result to the specified register(s) in the w array. 3.6.2 data accumulators and adder/subtracter the data accumulator consists of a 40-bit adder/ subtracter with automatic sign extension logic. it can select one of two accumulators (a or b) as its pre- accumulation source and post-accumulation destination. for the add and lac instructions, the data to be accumulated or loaded can be optionally scaled using the barrel shifter prior to accumulation. 3.6.2.1 adder/subtracter, overflow and saturation the adder/subtracter is a 40- bit adder with an optional zero input into one side, and either true or complement data into the other input. ? in the case of addition, the carry/b orrow input is active-high and the other input is true data (not complemented). ? in the case of subtraction, the carry/borrow input is active-low and the other input is complemented. the adder/subtracter generates overflow status bits, sa/sb and oa/ob, which are latched and reflected in the status register: ? overflow from bit 39: this is a catastrophic overflow in which the sign of the accumulator is destroyed. ? overflow into guard bits, 32 through 39: this is a recoverable overflow. this bit is set whenever all the guard bits are not identical to each other. the adder has an additional saturation block that controls accumulator data saturation, if selected. it uses the result of the adder, the overflow status bits described previously and the sat (corcon<7:6>) and accsat (corcon<4>) mode control bits to determine when and to what value to saturate. six status register bits support saturation and overflow: ? oa: acca overflowed into guard bits ? ob: accb overflowed into guard bits ? sa: acca saturated (bit 31 overflow and saturation) or acca overflowed into guard bits and saturated (bit 39 overflow and saturation) ? sb: accb saturated (bit 31 overflow and saturation) or accb overflowed into guard bits and saturated (bit 39 overflow and saturation) ? oab: logical or of oa and ob ? sab: logical or of sa and sb the oa and ob bits are modified each time data passes through the adder/su btracter. when set, they indicate that the most recent operation has overflowed into the accumulator guard bits (bits 32 through 39). the oa and ob bits can also optionally generate an arithmetic warning trap when set and the correspond- ing overflow trap flag enable bits (ovate, ovbte) in the intcon1 register are set (refer to section 7.0 ?interrupt controller? ). this allows the user applica- tion to take immediate action, for example, to correct system gain.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 42 ? 2009-2012 microchip technology inc. the sa and sb bits are modified each time data passes through the adder/subtracter, but can only be cleared by the user applicat ion. when set, they indicate that the accumulator has overflowed its maximum range (bit 31 for 32-bit saturation or bit 39 for 40-bit saturation) and will be saturated (if saturation is enabled). when saturation is not enabled, sa and sb default to bit 39 overflow and thus, indicate that a cata- strophic overflow has occurred. if the covte bit in the intcon1 register is set, sa and sb bits will generate an arithmetic warning trap when saturation is disabled. the overflow and saturation status bits can optionally be viewed in the status register (sr) as the logical or of oa and ob (in bit oab) and the logical or of sa and sb (in bit sab). progra mmers can check one bit in the status register to determine if either accumulator has overflowed, or one bit to determine if either accumulator has saturated. this is useful for complex number arithmetic, which typically uses both accumulators. the device supports three saturation and overflow modes: ? bit 39 overflow and saturation: when bit 39 overflow and saturation occurs, the saturation logic loads the maximally positive 9.31 (0x7fffffffff) or maximally negative 9.31 value (0x8000000000) into the target accumu- lator. the sa or sb bit is set and remains set until cleared by the user application. this condition is referred to as ?super saturation? and provides protection against erroneous data or unexpected algorithm problems (such as gain calculations). ? bit 31 overflow and saturation: when bit 31 overflow and saturation occurs, the saturation logic then loads the maximally positive 1.31 value (0x007fffffff) or maximally nega- tive 1.31 value (0x0080000000) into the target accumulator. the sa or sb bit is set and remains set until cleared by the user application. when this saturation mode is in effect, the guard bits are not used, so the oa, ob or oab bits are never set. ? bit 39 catastrophic overflow: the bit 39 overflow status bit from the adder is used to set the sa or sb bit, which remains set until cleared by the user application. no saturation operation is performed, and the accumulator is allowed to overflow, destroying its sign. if the covte bit in the intcon1 register is set, a catastrophic overflow can initiate a trap exception. 3.6.3 accumulator ?write back? the mac class of instructions (with the exception of mpy , mpy.n , ed and edac ) can optionally write a rounded version of the high word (bits 31 through 16) of the accumulator that is no t targeted by the instruction into data space memory. the write is performed across the x bus into combined x and y address space. the following addressing modes are supported: ? w13, register direct: the rounded contents of the non-target accumulator are written into w13 as a 1.15 fraction. ? [w13] + = 2, register indirect with post-increment: the rounded contents of the non-target accumulator are written into the address pointed to by w13 as a 1.15 fraction. w13 is then incremented by 2 (for a word write). 3.6.3.1 round logic the round logic is a combinational block that performs a conventional (biased) or convergent (unbiased) round function during an accumulator write (store). the round mode is determined by the state of the rnd bit in the corcon register. it generates a 16-bit, 1.15 data value that is pass ed to the data space write saturation logic. if rounding is not indicated by the instruction, a truncated 1. 15 data value is stored and the least significant word is simply discarded. conventional rounding zero-extends bit 15 of the accu- mulator and adds it to the accxh word (bits 16 through 31 of the accumulator). ? if the accxl word (bits 0 through 15 of the accumulator) is between 0x8000 and 0xffff (0x8000 included), accxh is incremented. ? if accxl is between 0x0000 and 0x7fff, accxh is left unchanged. a consequence of this al gorithm is that over a succession of random rounding operations, the value tends to be biased slightly positive. convergent (or unbiased) rounding operates in the same manner as conventional rounding, except when accxl equals 0x8000. in this case, the least significant bit (bit 16 of t he accumulator) of accxh is examined: ? if it is ? 1 ?, accxh is incremented. ? if it is ? 0 ?, accxh is not modified. assuming that bit 16 is effectively random in nature, this scheme removes any rounding bias that may accumulate. the sac and sac.r instructions store either a truncated ( sac ), or rounded ( sac.r ) version of the contents of the target accumulator to data memory via the x bus, subject to data saturation (see section 3.6.3.2 ?data space write saturation? ). for the mac class of instructions, the accumulator write- back operation functions in the same manner, addressing combined mcu (x and y) data space though the x bus. for this class of instructions, the data is always subject to rounding.
? 2009-2012 microchip technology inc. ds70591e-page 43 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 3.6.3.2 data space write saturation in addition to adder/subtracter saturation, writes to data space can also be saturat ed, but without affecting the contents of the source accumulator. the data space write saturation logic block accepts a 16-bit, 1.15 fractional value from the round logic block as its input, together with overflow status from the original source (accumulator) and the 16-bit round adder. these inputs are combined and used to select the appropriate 1.15 fractional value as output to write to data space memory. if the satdw bit in the corcon register is set, data (after rounding or truncation) is tested for overflow and adjusted accordingly: ? for input data greater than 0x007fff, data written to memory is forced to the maximum positive 1.15 value, 0x7fff. ? for input data less than 0xff8000, data written to memory is forced to the maximum negative 1.15 value, 0x8000. the most significant bit of t he source (bit 39) is used to determine the sign of the operand being tested. if the satdw bit in the corco n register is not set, the input data is always passed through unmodified under all conditions. 3.6.4 barrel shifter the barrel shifter can perform up to 16-bit arithmetic or logic right shifts, or up to 16-bit left shifts in a single cycle. the source can be either of the two dsp accumulators or the x bus (to support multi-bit shifts of register or memory data). the shifter requires a signed binary value to determine both the magnitude (number of bits) and direction of the shift operation. a positive value shifts the operand right. a negative value shifts the operand left. a value of ? 0 ? does not modify the operand. the barrel shifter is 40 bits wide, thereby obtaining a 40-bit result for dsp shift operations and a 16-bit result for mcu shift operations. data from the x bus is presented to the barrel shifter between bit positions 16 and 31 for right shifts, and between bit positions 0 and 16 for left shifts.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 44 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 45 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 4.0 memory organization the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 architecture fea- tures separate program and data memory spaces and buses. this architecture also allows the direct access to program memory from the data space during code execution. 4.1 program address space the program address memory space is 4m instruc- tions. the space is addressable by a 24-bit value derived either from the 23-bit program counter (pc) during program execution, or from table operation or data space remapping as described in section 4.6 ?interfacing program and data memory spaces? . user application access to the program memory space is restricted to the lower half of the address range (0x000000 to 0x7fffff). the exception is the use of tblrd/tblwt operations, which use tblpag<7> to permit access to the configuration bits and device id sections of the configuration memory space. the memory maps are shown in figure 4-1 . figure 4-1: program memory maps fo r dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices note: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the dspic33f/pic24h family reference manual , ?section 4. program memory? (ds70203), which is available from the microchip web site ( www.microchip.com ). reset address 0x000000 0x0000fe 0x000002 0x000100 device configuration user program flash memory 0x005800 0x0057fe (11008 instructions) 0x800000 0xf80000 registers 0xf80017 0xf80018 devid (2) 0xfefffe 0xff0000 0xfffffe 0xf7fffe unimplemented (read ? 0 ?s) goto instruction 0x000004 reserved 0x7ffffe reserved 0x000200 0x0001fe 0x000104 alternate vector table reserved interrupt vector table dspic33fj32gs406/606/608/610 configuration memory space user memory space reset address 0x000000 0x0000fe 0x000002 0x000100 device configuration user program flash memory 0x00ac00 0x00abfe (21760 instructions) 0x800000 0xf80000 registers 0xf80017 0xf80018 0xf7fffe unimplemented (read ? 0 ?s) goto instruction 0x000004 reserved 0x7ffffe reserved 0x000200 0x0001fe 0x000104 alternate vector table reserved interrupt vector table dspic33fj64gs406/606/608/610 configuration memory space user memory space reserved 0xff0002 devid (2) reserved 0xfefffe 0xff0000 0xfffffe 0xff0002
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 46 ? 2009-2012 microchip technology inc. 4.1.1 program memory organization the program memory space is organized in word-addressable blocks. al though it is treated as 24 bits wide, it is more appropriate to think of each address of the program memory as a lower and upper word, with the upper byte of the upper word being unimplemented. the lower word always has an even address, while the upper word has an odd address (see figure 4-2 ). program memory addresses are always word-aligned on the lower word, and addresses are incremented or decremented by two during the code execution. this arrangement provides compatibility with data memory space addressing and makes data in the program memory space accessible. 4.1.2 interrupt and trap vectors all dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/ 610 devices reserve the addresses between 0x00000 and 0x000200 for hard-coded program execution vectors. a hardware reset vector is provided to redirect code execution from the default value of the pc on device reset to the actual start of code. a goto instruction is programmed by the user application at 0x000000, with the actual address for the start of code at 0x000002. the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608 /610 devices also have two interrupt vector tables (ivt), located from 0x000004 to 0x0000ff and 0x000100 to 0x0001ff. these vector tables allow each of the device interrupt sources to be handled by separate interrupt service routines (isrs). a more detailed discussion of the interrupt vector tables is provided in section 7.1 ?interrupt vector table? . figure 4-2: program memory organization 0 8 16 pc address 0x000000 0x000002 0x000004 0x000006 23 00000000 00000000 00000000 00000000 program memory ?phantom? byte (read as ? 0 ?) least significant word most significant word instruction width 0x000001 0x000003 0x000005 0x000007 msw address (lsw address)
? 2009-2012 microchip technology inc. ds70591e-page 47 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 4.2 data address space the cpu has a separate 16-bit-wide data memory space. the data space is accessed using separate address generation units (agus) for read and write operations. the data memory maps is shown in figure 4-3 . all effective addresses (eas) in the data memory space are 16 bits wide and point to bytes within the data space. this arrangement gives a data space address range of 64 kbytes or 32k words. the lower half of the data memory space (that is, when ea<15> = 0 ) is used for implemented memory addresses, while the upper half (ea<15> = 1 ) is reserved for the program space visibility area (see section 4.6.3 ?reading data from program memory using program space visibility? ). the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608 /610 devices implement up to 9 kbytes of data memory. should an ea point to a location outside of this area, an all-zero word or byte will be returned. 4.2.1 data space width the data memory space is organized in byte addressable, 16-bit wide blocks. data is aligned in data memory and registers as 16-bit words, but all data space eas resolve to bytes. the least significant bytes (lsbs) of each word have even addresses, while the most significant bytes (msbs) have odd addresses. 4.2.2 data memory organization and alignment to maintain backward compatibility with pic ? mcu devices and improve data space memory usage efficiency, the instruction se t supports both word and byte operations. as a consequence of byte accessibil- ity, all effective address calculations are internally scaled to step through word-aligned memory. for example, the core recogn izes that post-modified register indirect addressing mode [ws++] that results in a value of ws + 1 for byte operations and ws + 2 for word operations. data byte reads will read the complete word that contains the byte, using the lsb of any ea to determine which byte to select. the selected byte is placed onto the lsb of the data path. that is, data memory and registers are organized as two parallel byte-wide entities with shared (word) address decode but separate write lines. data byte writes only write to the corresponding side of the array or register that matches the byte address. all word accesses must be aligned to an even address. misaligned word data fetches are not supported, so care must be taken when mixing byte and word operations, or translating from 8-bit mcu code. if a misaligned read or write is attempted, an address error trap is generated. if the e rror occurred on a read, the instruction underway is completed. if the error occurred on a write, the instruction is executed but the write does not occur. in either case, a trap is then executed, allowing the system and/or user application to examine the machine state prior to execution of the address fault. all byte loads into any w register are loaded into the least significant byte. the most significant byte is not modified. a sign-extend ( se ) instruction is provided to allow user applications to translate 8-bit signed data to 16-bit signed values. alternatively, for 16-bit unsigned data, user applications can clear the msb of any w register by executing a zero-extend ( ze ) instruction on the appropriate address. 4.2.3 sfr space the first 2 kbytes of the near data space, from 0x0000 to 0x07ff, is primarily occupied by special function registers (sfrs). these are used by the core and peripheral modules for controlling the operation of the device. sfrs are distributed amon g the modules that they control, and are generally grouped together by module. much of the sfr space contains unused addresses; these are read as ? 0 ?. 4.2.4 near data space the 8-kbyte area between 0x0000 and 0x1fff is referred to as the near data space. locations in this space are directly addressable via a 13-bit absolute address field within all memory direct instructions. additionally, the whole data space is addressable using mov instructions, which support memory direct addressing mode with a 16-bit address field, or by using indirect addressing mode using a working register as an address pointer. note: the actual set of peripheral features and interrupts varies by the device. refer to the corresponding device tables and pinout diagrams for device-specific information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 48 ? 2009-2012 microchip technology inc. figure 4-3: data memory map for devices with 4-kbyte ram 0x0000 0x07fe 0x17fe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x07ff 0xffff optionally mapped into program memory 0x0801 0x0800 0x1800 2-kbyte sfr space 0x8001 0x8000 x data unimplemented (x) 0x0ffe 0x1000 0x0fff 0x1001 0x17ff 0x1801 6-kbyte near data space y data ram (y) sfr space x data ram (x)
? 2009-2012 microchip technology inc. ds70591e-page 49 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 4-4: data memory map for devices with 8-kbyte ram 0x0000 0x07fe 0x27fe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x07ff 0xffff optionally mapped into program memory 0x0801 0x0800 0x2800 2-kbyte sfr space 0x8001 0x8000 sfr space x data unimplemented (x) 0x17fe 0x1800 0x17ff 0x1801 0x27ff 0x2801 0x1fff 0x1ffe 0x2001 0x2000 8-kbyte near data space x data ram (x) y data ram (y)
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 50 ? 2009-2012 microchip technology inc. figure 4-5: data memory map for devices with 9-kbyte ram 0x0000 0x07fe 0x27fe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x07ff 0xffff optionally mapped into program memory 0x0801 0x0800 0x2800 2-kbyte sfr space 0x8001 0x8000 sfr space x data unimplemented (x) 0x17fe 0x1800 0x17ff 0x1801 0x27ff 0x2801 0x1fff 0x1ffe 0x2001 0x2000 8-kbyte near data space 0x2bfe 0x2c00 0x2bff 0x2c01 x data ram (x) y data ram (y) dma ram
? 2009-2012 microchip technology inc. ds70591e-page 51 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 4.2.5 x and y data spaces the core has two data spaces, x and y. these data spaces can be considered either separate (for some dsp instructions), or as one unified linear address range (for mcu instructions). the data spaces are accessed using two address generation units (agus) and separate data paths. this feature allows certain instructions to concurrently fetch two words from ram, thereby enabling efficient ex ecution of dsp algorithms such as finite impulse response (fir) filtering and fast fourier transform (fft). the x data space is used by all instructions and supports all addressing modes. x data space has separate read and write data buses. the x read data bus is the read data path for all instructions that view data space as combined x and y address space. it is also the x data prefetch pa th for the dual operand dsp instructions ( mac class). the y data space is used in concert with the x data space by the mac class of instructions ( clr , ed , edac , mac , movsac , mpy , mpy.n and msc ) to provide two concurrent data read paths. both the x and y data spaces support modulo addressing mode for all instructions, subject to addressing mode restrictions . bit-reversed addressing mode is only supported for writes to x data space. all data memory writes, including in dsp instructions, view data space as combined x and y address space. the boundary between the x and y data spaces is device-dependent and is not user-programmable. all effective addresses (eas) are 16 bits wide and point to bytes within the data space. therefore, the data space address range is 64 kbytes, or 32k words, though the implemented memo ry locations vary by device. 4.2.6 dma ram some devices contain 1 kbyte of dual ported dma ram, which is located at the end of y data space. memory locations that are part of y data ram and are in the dma ram space are accessible simultaneously by the cpu and the dma cont roller module. dma ram is utilized by the dma controller to store data to be transferred to various peripherals using dma, as well as data transferred from various peripherals using dma. the dma ram can be accessed by the dma controller without having to steal cycles from the cpu. when the cpu and the dma controller attempt to concurrently write to the same dma ram location, the hardware ensures that the cpu is given precedence in accessing the dma ram location. therefore, the dma ram provides a reliable means of transferring dma data without ever having to stall the cpu.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 52 ? 2009-2012 microchip technology inc. table 4-1: cpu core register map sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets wreg0 0000 working register 0 0000 wreg1 0002 working register 1 0000 wreg2 0004 working register 2 0000 wreg3 0006 working register 3 0000 wreg4 0008 working register 4 0000 wreg5 000a working register 5 0000 wreg6 000c working register 6 0000 wreg7 000e working register 7 0000 wreg8 0010 working register 8 0000 wreg9 0012 working register 9 0000 wreg10 0014 working register 10 0000 wreg11 0016 working register 11 0000 wreg12 0018 working register 12 0000 wreg13 001a working register 13 0000 wreg14 001c working register 14 0000 wreg15 001e working register 15 0800 splim 0020 stack pointer limit register xxxx accal 0022 accal xxxx accah 0024 accah xxxx accau 0026 acca<39> acca<39> acca<39> acca<39> acca<39> acca<39> acca<39> acca<39> accau xxxx accbl 0028 accbl xxxx accbh 002a accbh xxxx accbu 002c accb<39> accb<39> accb<39> accb<39> accb<39> accb<39> accb<39> accb<39> accbu xxxx pcl 002e program counter low word register 0000 pch 0030 ? ? ? ? ? ? ? ? program counter high byte register 0000 tblpag 0032 ? ? ? ? ? ? ? ? table page address pointer register 0000 psvpag 0034 ? ? ? ? ? ? ? ? program memory visibility page address pointer register 0000 rcount 0036 repeat loop counter register xxxx dcount 0038 dcount<15:0> xxxx dostartl 003a dostartl<15:1> 0xxxx dostarth 003c ? ? ? ? ? ? ? ? ? ?dostarth<5:0> 00xx doendl 003e doendl<15:1> 0xxxx doendh 0040 ? ? ? ? ? ? ? ? ? ?doendh 00xx sr 0042 oa ob sa sb oab sab da dc ipl2 ipl1 ipl0 ra n ov z c 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 53 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 corcon 0044 ? ? ? us edt dl<2:0> sata satb satdw accsat ipl3 psv rnd if 0000 modcon 0046 xmoden ymoden ? ? bwm<3:0> ywm<3:0> xwm<3:0> 0000 xmodsrt 0048 xs<15:1> 0xxxx xmodend 004a xe<15:1> 1xxxx ymodsrt 004c ys<15:1> 0xxxx ymodend 004e ye<15:1> 1xxxx xbrev 0050 bren xb<14:0> xxxx disicnt 0052 ? ? disable interrupts counter register xxxx table 4-1: cpu core register map (continued) sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 54 ? 2009-2012 microchip technology inc. table 4-2: change notification register map for ds pic33fj32gs608/610 and dspi c33fj64gs608/610 devices table 4-3: change notification register map for ds pic33fj32gs406/606 and dspi c33fj64gs406/606 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets cnen1 0060 cn15ie cn14ie cn13ie cn12ie cn11ie cn10ie cn9ie cn8ie cn7ie cn6ie cn5ie cn4ie cn3ie cn2ie cn1ie cn0ie 0000 cnen2 0062 ? ? ? ? ? ? ? ? cn23iecn22iecn21iecn20iecn19iecn18iecn17iecn16ie 0000 cnpu1 0068 cn15pue cn14pue cn13pue cn12pue cn11pue cn10pue cn9pue cn8pue cn7pue cn6pue cn5pue cn4pue cn3pue cn2pue cn1pue cn0pue 0000 cnpu2 006a ? ? ? ? ? ? ? ? cn23pue cn22pue cn21pue cn20pue cn19pue cn18pue cn17pue cn16pue 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets cnen1 0060 cn15ie cn14ie cn13ie cn12ie cn11ie cn10ie cn9ie cn8ie cn7ie cn6ie cn5ie cn4ie cn3ie cn2ie cn1ie cn0ie 0000 cnen2 0062 ? ? ? ? ? ? ? ? cn23ie cn22ie ? ? ? cn18ie cn17ie cn16ie 0000 cnpu1 0068 cn15pue cn14pue cn13pue cn12pue cn11pue cn10pue cn9pue cn8pue cn7pue cn6pue cn5pue cn4pue cn3pue cn2pue cn1pue cn0pue 0000 cnpu2 006a ? ? ? ? ? ? ? ? cn23pue cn22pue ? ? ? cn18pue cn17pue cn16pue 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 55 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-4: interrupt controller register map for dspic33fj64gs610 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 0080 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err dmacerr matherr addrerr stkerr oscfail ? 0000 intcon2 0082 altivt disi ? ? ? ? ? ? ? ? ? int4ep int3ep int2ep int1ep int0ep 0000 ifs0 0084 ? dma1if adif u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if dma0if t1if oc1if ic1if int0if 0000 ifs1 0086 u2txif u2rxif int2if t5if t4if oc4if oc3if dma2if ? ? ? int1if cnif ac1if mi2c1if si2c1if 0000 ifs2 0088 ? ? ? ? ? ? ? ? ? ic4if ic3if dma3if c1if c1rxif spi2if spi2eif 0000 ifs3 008a ? ? ? ? ? qei1if psemif ? ? int4if int3if ? ? mi2c2if si2c2if ? 0000 ifs4 008c ? ? ? ?qei2if ? psesmif ? ?c1txif ? ? ?u2eifu1eif ? 0000 ifs5 008e pwm2if pwm1if adcp12if ? ? ? ? ? ? ? ? adcp11if adcp10if adcp9if adcp8if ? 0000 ifs6 0090 adcp1if adcp0if ? ? ? ? ac4if ac3if ac2if pwm9if pwm8if pwm7if pwm6if pwm5if pwm4if pwm3if 0000 ifs7 0092 ? ? ? ? ? ? ? ? ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if 0000 iec0 0094 ? dma1ie adie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie dma0ie t1ie oc1ie ic1ie int0ie 0000 iec1 0096 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie dma2ie ? ? ? int1ie cnie ac1ie mi2c1ie si2c1ie 0000 iec2 0098 ? ? ? ? ? ? ? ? ? ic4ie ic3ie dma3ie c1ie c1rxie spi2ie spi2eie 0000 iec3 009a ? ? ? ? ?qei1iepsemie ? ? int4ie int3ie ? ? mi2c2ie si2c2ie ? 0000 iec4 009c ? ? ? ?qei2ie ? psesmie ? ?c1txie ? ? ?u2eieu1eie ? 0000 iec5 009e pwm2ie pwm1ie adcp12ie ? ? ? ? ? ? ? ? adcp11ie adcp10ie adcp9ie adcp8ie ? 0000 iec6 00a0 adcp1ie adcp0ie ? ? ? ? ac4ie ac3ie ac2ie pwm9ie pwm8ie pwm7ie pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec7 00a2 ? ? ? ? ? ? ? ? ? ? adcp7ie adcp6ie adcp5ie adcp4ie adcp3ie adcp2ie 0000 ipc0 00a4 ?t1ip<2:0> ? oc1ip<2:0> ? ic1ip<2:0> ? int0ip<2:0> 4444 ipc1 00a6 ? t2ip<2:0> ?oc2ip<2:0> ? ic2ip<2:0> ? dma0ip<2:0> 4444 ipc2 00a8 ? u1rxip<2:0> ? spi1ip<2:0> ? spi1eip<2:0> ? t3ip<2:0> 0444 ipc3 00aa ? ? ? ? ? dma1ip<2:0> ? adip<2:0> ? u1txip<2:0> 0044 ipc4 00ac ? cnip<2:0> ? ac1ip<2:0> ? mi2c1ip<2:0> ? si2c1ip<2:0> 4444 ipc5 00ae ? ? ? ? ? ? ? ? ? ? ? ? ? int1ip<2:0> 0004 ipc6 00b0 ? t4ip<2:0> ?oc4ip<2:0> ? oc3ip<2:0> ? dma2ip<2:0> 4444 ipc7 00b2 ? u2txip<2:0> ? u2rxip<2:0> ? int2ip<2:0> ? t5ip<2:0> 4444 ipc8 00b4 ? c1ip<2:0> ? c1rxip<2:0> ? spi2ip<2:0> ? spi2eip<2:0> 4444 ipc9 00b6 ? ? ? ? ?ic4ip<2:0> ? ic3ip<2:0> ? dma3ip<2:0> 0444 ipc12 00bc ? ? ? ? ? mi2c2ip<2:0> ? si2c2ip<2:0> ? ? ? ? 0440 ipc13 00be ? ? ? ? ? int4ip<2:0> ? int3ip<2:0> ? ? ? ? 0440 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 56 ? 2009-2012 microchip technology inc. ipc14 00c0 ? ? ? ? ? qei1ip<2:0> ? psemip<2:0> ? ? ? ? 0440 ipc16 00c4 ? ? ? ? ?u2eip<2:0> ?u1eip<2:0> ? ? ? ? 0440 ipc17 00c6 ? ? ? ? ? c1txip<2:0> ? ? ? ? ? ? ? ? 0400 ipc18 00c8 ? qei2ip<2:0> ? ? ? ? ? psesmip<2:0> ? ? ? ? 4040 ipc20 00cc ? adcp10ip<2:0> ? adcp9ip<2:0> ? adcp8ip<2:0> ? ? ? ? 4440 ipc21 00ce ? ? ? ? ? ? ? ? ? adcp12ip<2:0> ? adcp11ip<2:0> 0044 ipc23 00d2 ? pwm2ip<2:0> ? pwm1ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc24 00d4 ? pwm6ip<2:0> ? pwm5ip<2:0> ? pwm4ip<2:0> ? pwm3ip<2:0> 4444 ipc25 00d6 ? ac2ip<2:0> ? pwm9ip<2:0> ? pwm8ip<2:0> ? pwm7ip<2:0> 4444 ipc26 00d8 ? ? ? ? ? ? ? ? ?ac4ip<2:0> ? ac3ip<2:0> 0044 ipc27 00da ? adcp1ip<2:0> ? adcp0ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc28 00dc ? adcp5ip<2:0> ? adcp4ip<2:0> ? adcp3ip<2:0> ? adcp2ip<2:0> 4444 ipc29 00de ? ? ? ? ? ? ? ? ? adcp7ip<2:0> ? adcp6ip<2:0> 0044 inttreg 00e0 ? ? ? ?ilr<3:0> ?vecnum<6:0> 0000 table 4-4: interrupt controller register ma p for dspic33fj64gs610 devices (continued) file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 57 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-5: interrupt controller register map for dspic33fj64gs608 devices sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 0080 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err dmacerr matherr addrerr stkerr oscfail ? 0000 intcon2 0082 altivt disi ? ? ? ? ? ? ? ? ? int4ep int3ep int2ep int1ep int0ep 0000 ifs0 0084 ? dma1if adif u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if dma0if t1if oc1if ic1if int0if 0000 ifs1 0086 u2txif u2rxif int2if t5if t4if oc4if oc3if dma2if ? ? ? int1if cnif ac1if mi2c1if si2c1if 0000 ifs2 0088 ? ? ? ? ? ? ? ? ? ic4if ic3if dma3if c1if c1rxif spi2if spi2eif 0000 ifs3 008a ? ? ? ? ? qei1if psemif ? ? int4if int3if ? ? mi2c2if si2c2if ? 0000 ifs4 008c ? ? ? ?qei2if ? psesmif ? ?c1txif ? ? ?u2eifu1eif ? 0000 ifs5 008e pwm2if pwm1if adcp12if ? ? ? ? ? ? ? ? ? ? ? adcp8if ? 0000 ifs6 0090 adcp1if adcp0if ? ? ? ? ac4if ac3if ac2if ? pwm8if pwm7if pwm6if pwm5if pwm4if pwm3if 0000 ifs7 0092 ? ? ? ? ? ? ? ? ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if 0000 iec0 0094 ? dma1ie adie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie dma0ie t1ie oc1ie ic1ie int0ie 0000 iec1 0096 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie dma2ie ? ? ? int1ie cnie ac1ie mi2c1ie si2c1ie 0000 iec2 0098 ? ? ? ? ? ? ? ? ? ic4ie ic3ie dma3ie c1ie c1rxie spi2ie spi2eie 0000 iec3 009a ? ? ? ? ?qei1iepsemie ? ? int4ie int3ie ? ? mi2c2ie si2c2ie ? 0000 iec4 009c ? ? ? ?qei2ie ? psesmie ? ?c1txie ? ? ?u2eieu1eie ? 0000 iec5 009e pwm2ie pwm1ie adcp12ie ? ? ? ? ? ? ? ? ? ? ? adcp8ie ? 0000 iec6 00a0 adcp1ie adcp0ie ? ? ? ? ac4ie ac3ie ac2ie ? pwm8ie pwm7ie pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec7 00a2 ? ? ? ? ? ? ? ? ? ? adcp7ie adcp6ie adcp5ie adcp4ie adcp3ie adcp2ie 0000 ipc0 00a4 ? t1ip<2:0> ? oc1ip<2:0> ? ic1ip<2:0> ? int0ip<2:0> 4444 ipc1 00a6 ? t2ip<2:0> ? oc2ip<2:0> ? ic2ip<2:0> ? dma0ip<2:0> 4444 ipc2 00a8 ? u1rxip<2:0> ? spi1ip<2:0> ? spi1eip<2:0> ? t3ip<2:0> 4444 ipc3 00aa ? ? ? ? ? dma1ip<2:0> ?adip<2:0> ? u1txip<2:0> 4444 ipc4 00ac ? cnip<2:0> ? ac1ip<2:0> ?mi2c1ip<2:0> ? si2c1ip<2:0> 4444 ipc5 00ae ? ? ? ? ? ? ? ? ? ? ? ? ? int1ip<2:0> 0004 ipc6 00b0 ? t4ip<2:0> ? oc4ip<2:0> ? oc3ip<2:0> ? dma2ip<2:0> 4444 ipc7 00b2 ? u2txip<2:0> ? u2rxip<2:0> ? int2ip<2:0> ? t5ip<2:0> 4444 ipc8 00b4 ? c1ip<2:0> ? c1rxip<2:0> ? spi2ip<2:0> ? spi2eip<2:0> 4444 ipc9 00b6 ? ? ? ? ?ic4ip<2:0> ? ic3ip<2:0> ? dma3ip<2:0> 0444 ipc12 00bc ? ? ? ? ? mi2c2ip<2:0> ? si2c2ip<2:0> ? ? ? ? 0440 ipc13 00be ? ? ? ? ? int4ip<2:0> ? int3ip<2:0> ? ? ? ? 0440 ipc14 00c0 ? ? ? ? ? qei1ip<2:0> ? psemip<2:0> ? ? ? ? 0440 ipc16 00c4 ? ? ? ? ? u2eip<2:0> ? u1eip<2:0> ? ? ? ? 0440 ipc17 00c6 ? ? ? ? ? c1txip<2:0> ? ? ? ? ? ? ? ? 0400 ipc18 00c8 ? qei2ip<2:0> ? ? ? ? ? psesmip<2:0> ? ? ? ? 4040 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 58 ? 2009-2012 microchip technology inc. ipc20 00cc ? ? ? ? ? ? ? ? ? adcp8ip<2:0> ? ? ? ? 0040 ipc21 00ce ? ? ? ? ? ? ? ? ? adcp12ip ? ? ? ? 0040 ipc23 00d2 ? pwm2ip<2:0> ? pwm1ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc24 00d4 ? pwm6ip<2:0> ? pwm5ip<2:0> ? pwm4ip<2:0> ? pwm3ip<2:0> 4444 ipc25 00d6 ? ac2ip<2:0> ? ? ? ? ? pwm8ip<2:0> ? pwm7ip<2:0> 4044 ipc26 00d8 ? ? ? ? ? ? ? ? ? ac4ip<2:0> ? ac3ip<2:0> 0044 ipc27 00da ? adcp1ip<2:0> ? adcp0ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc28 00dc ? adcp5ip<2:0> ? adcp4ip<2:0> ? adcp3ip<2:0> ? adcp2ip<2:0> 4444 ipc29 00de ? ? ? ? ? ? ? ? ? adcp7ip<2:0> ? adcp6ip<2:0> 0044 inttreg 00e0 ? ? ? ?ilr<3:0> ? vecnum<6:0> 0000 table 4-5: interrupt controller register ma p for dspic33fj64gs608 devices (continued) sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 59 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-6: interrupt controller register map for DSPIC33FJ64GS606 devices sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 0080 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err dmacerr matherr addrerr stkerr oscfail ? 0000 intcon2 0082 altivt disi ? ? ? ? ? ? ? ? ? int4ep int3ep int2ep int1ep int0ep 0000 ifs0 0084 ? dma1if adif u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if dma0if t1if oc1if ic1if int0if 0000 ifs1 0086 u2txif u2rxif int2if t5if t4if oc4if oc3if dma2if ? ? ? int1if cnif ac1if mi2c1if si2c1if 0000 ifs2 0088 ? ? ? ? ? ? ? ? ? ic4if ic3if dma3if c1if c1rxif spi2if spi2eif 0000 ifs3 008a ? ? ? ? ? qei1if psemif ? ? int4if int3if ? ? mi2c2if si2c2if ? 0000 ifs4 008c ? ? ? ?qei2if ? psesmif ? ?c1txif ? ? ?u2eifu1eif ? 0000 ifs5 008e pwm2if pwm1if adcp12if ? ? ? ? ? ? ? ? ? ? ? ? ? 0000 ifs6 0090 adcp1if adcp0if ? ? ? ? ac4if ac3if ac2if pwm9if pwm8if pwm7if pwm6if pwm5if pwm4if pwm3if 0000 ifs7 0092 ? ? ? ? ? ? ? ? ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if 0000 iec0 0094 ? dma1ie adie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie dma0ie t1ie oc1ie ic1ie int0ie 0000 iec1 0096 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie dma2ie ? ? ? int1ie cnie ac1ie mi2c1ie si2c1ie 0000 iec2 0098 ? ? ? ? ? ? ? ? ? ic4ie ic3ie dma3ie c1ie c1rxie spi2ie spi2eie 0000 iec3 009a ? ? ? ? ? qei1ie psemie ? ? int4ie int3ie ? ? mi2c2ie si2c2ie ? 0000 iec4 009c ? ? ? ?qei2ie ? psesmie ? ?c1txie ? ? ?u2eieu1eie ? 0000 iec5 009e pwm2ie pwm1ie adcp12ie ? ? ? ? ? ? ? ? ? ? ? ? ? 0000 iec6 00a0 adcp1ie adcp0ie ? ? ? ? ac4ie ac3ie ac2ie ? ? ? pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec7 00a2 ? ? ? ? ? ? ? ? ? ? adcp7ie adcp6ie adcp5ie adcp4ie adcp3ie adcp2ie 0000 ipc0 00a4 ? t1ip<2:0> ?oc1ip<2:0> ?ic1ip<2:0> ? int0ip<2:0> 4444 ipc1 00a6 ? t2ip<2:0> ?oc2ip<2:0> ?ic2ip<2:0> ? dma0ip<2:0> 4444 ipc2 00a8 ? u1rxip<2:0> ? spi1ip<2:0> ? spi1eip<2:0> ? t3ip<2:0> 4444 ipc3 00aa ? ? ? ? ? dma1ip<2:0> ? adip<2:0> ? u1txip<2:0> 4444 ipc4 00ac ? cnip<2:0> ? ac1ip<2:0> ? mi2c1ip<2:0> ? si2c1ip<2:0> 4444 ipc5 00ae ? ? ? ? ? ? ? ? ? ? ? ? ? int1ip<2:0> 0004 ipc6 00b0 ? t4ip<2:0> ?oc4ip<2:0> ? oc3ip<2:0> ? dma2ip<2:0> 4444 ipc7 00b2 ? u2txip<2:0> ? u2rxip<2:0> ? int2ip<2:0> ? t5ip<2:0> 4444 ipc8 00b4 ? c1ip<2:0> ? c1rxip<2:0> ? spi2ip<2:0> ? spi2eip<2:0> 4444 ipc9 00b6 ? ? ? ? ?ic4ip<2:0> ?ic3ip<2:0> ? dma3ip<2:0> 0444 ipc12 00bc ? ? ? ? ? mi2c2ip<2:0> ? si2c2ip<2:0> ? ? ? ? 0440 ipc13 00be ? ? ? ? ? int4ip<2:0> ? int3ip<2:0> ? ? ? ? 0440 ipc14 00c0 ? ? ? ? ? qei1ip<2:0> ? psemip<2:0> ? ? ? ? 0440 ipc16 00c4 ? ? ? ? ? u2eip<2:0> ?u1eip<2:0> ? ? ? ? 0440 ipc17 00c6 ? ? ? ? ? c1txip<2:0> ? ? ? ? ? ? ? ? 0400 ipc18 00c8 ? qei2ip<2:0> ? ? ? ? ? psesmip<2:0> ? ? ? ? 4040 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 60 ? 2009-2012 microchip technology inc. ipc21 00ce ? ? ? ? ? ? ? ? ? adcp12ip<2:0> ? ? ? ? 0040 ipc23 00d2 ? pwm2ip<2:0> ? pwm1ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc24 00d4 ? pwm6ip<2:0> ? pwm5ip<2:0> ? pwm4ip<2:0> ? pwm3ip<2:0> 4444 ipc25 00d6 ?ac2ip<2:0> ? pwm9ip<2:0> ? pwm8ip<2:0> ? pwm7ip<2:0> 4000 ipc26 00d8 ? ? ? ? ? ? ? ? ?ac4ip<2:0> ? ac3ip<2:0> 0044 ipc27 00da ? adcp1ip<2:0> ? adcp0ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc28 00dc ? adcp5ip<2:0> ? adcp4ip<2:0> ? adcp3ip<2:0> ? adcp2ip<2:0> 4444 ipc29 00de ? ? ? ? ? ? ? ? ? adcp7ip<2:0> ? adcp6ip<2:0> 0004 inttreg 00e0 ? ? ? ?ilr<3:0> ?vecnum<6:0> 0000 table 4-6: interrupt controller register ma p for DSPIC33FJ64GS606 devices (continued) sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 61 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-7: interrupt controller register map for dspic33fj32gs406 and dspi c33fj64gs406 devices sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 0080 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err ? matherr addrerr stkerr oscfail ? 0000 intcon2 0082 altivt disi ? ? ? ? ? ? ? ? ? int4ep int3ep int2ep int1ep int0ep 0000 ifs0 0084 ? ? adif u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if ? t1if oc1if ic1if int0if 0000 ifs1 0086 u2txif u2rxif int2if t5if t4if oc4if oc3if ? ? ? ?int1ifcnif ? mi2c1if si2c1if 0000 ifs2 0088 ? ? ? ? ? ? ? ? ? ic4if ic3if ? ? ? spi2if spi2eif 0000 ifs3 008a ? ? ? ? ?qei1ifpsemif ? ? int4if int3if ? ? mi2c2if si2c2if ? 0000 ifs4 008c ? ? ? ? ? ? psesmif ? ? ? ? ? ?u2eifu1eif ? 0000 ifs5 008e pwm2if pwm1if adcp12if ? ? ? ? ? ? ? ? ? ? ? ? ? 0000 ifs6 0090 adcp1if adcp0if ? ? ? ? ? ? ? ? ? ? pwm6if pwm5if pwm4if pwm3if 0000 ifs7 0092 ? ? ? ? ? ? ? ? ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if 0000 iec0 0094 ? ? adie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie ? t1ie oc1ie ic1ie int0ie 0000 iec1 0096 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie ? ? ? ? int1ie cnie ? mi2c1ie si2c1ie 0000 iec2 0098 ? ? ? ? ? ? ? ? ? ic4ie ic3ie ? ? ? spi2ie spi2eie 0000 iec3 009a ? ? ? ? ? qei1ie psemie ? ? int4ie int3ie ? ?mi2c2iesi2c2ie ? 0000 iec4 009c ? ? ? ? ? ? psesmie ? ? ? ? ? ?u2eieu1eie ? 0000 iec5 009e pwm2ie pwm1ie adcp12ie ? ? ? ? ? ? ? ? ? ? ? ? ? 0000 iec6 00a0 adcp1ie adcp0ie ? ? ? ? ? ? ? ? ? ? pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec7 00a2 ? ? ? ? ? ? ? ? ? ? adcp7ie adcp6ie adcp5ie adcp4ie adcp3ie adcp2ie 0000 ipc0 00a4 ? t1ip<2:0> ? oc1ip<2:0> ? ic1ip<2:0> ? int0ip<2:0> 4444 ipc1 00a6 ? t2ip<2:0> ? oc2ip<2:0> ? ic2ip<2:0> ? ? ? ? 4440 ipc2 00a8 ? u1rxip<2:0> ? spi1ip<2:0> ? spi1eip<2:0> ? t3ip<2:0> 4444 ipc3 00aa ? ? ? ? ? ? ? ? ? adip<2:0> ? u1txip<2:0> 0044 ipc4 00ac ? cnip<2:0> ? ? ? ? ? mi2c1ip<2:0> ? si2c1ip<2:0> 4444 ipc5 00ae ? ? ? ? ? ? ? ? ? ? ? ? ? int1ip<2:0> 0004 ipc6 00b0 ? t4ip<2:0> ? oc4ip<2:0> ? oc3ip<2:0> ? ? ? ? 4440 ipc7 00b2 ? u2txip<2:0> ? u2rxip<2:0> ? int2ip<2:0> ? t5ip<2:0> 4444 ipc8 00b4 ? ? ? ? ? ? ? ? ? spi2ip<2:0> ? spi2eip<2:0> 0044 ipc9 00b6 ? ? ? ? ? ic4ip<2:0> ? ic3ip<2:0> ? ? ? ? 0440 ipc12 00bc ? ? ? ? ? mi2c2ip<2:0> ? si2c2ip<2:0> ? ? ? ? 0440 ipc13 00be ? ? ? ? ? int4ip<2:0> ? int3ip<2:0> ? ? ? ? 0440 ipc14 00c0 ? ? ? ? ? qei1ip<2:0> ? psemip<2:0> ? ? ? ? 0440 ipc16 00c4 ? ? ? ? ?u2eip<2:0> ?u1eip<2:0> ? ? ? ? 0440 ipc18 00c8 ? ? ? ? ? ? ? ? ? psesmip<2:0> ? ? ? ? 0040 ipc23 00d2 ? pwm2ip<2:0> ? pwm1ip<2:0> ? ? ? ? ? ? ? ? 4400 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 62 ? 2009-2012 microchip technology inc. ipc24 00d4 ? pwm6ip<2:0> ? pwm5ip<2:0> ? pwm4ip<2:0> ? pwm3ip<2:0> 4444 ipc27 00da ? adcp1ip<2:0> ? adcp0ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc28 00dc ? adcp5ip<2:0> ? adcp4ip<2:0> ? adcp3ip<2:0> ? adcp2ip<2:0> 4444 ipc29 00de ? ? ? ? ? ? ? ? ? adcp7ip<2:0> ? adcp6ip<2:0> 0004 inttreg 00e0 ? ? ? ?ilr<3:0> ? vecnum<6:0> 0000 table 4-7: interrupt controller register map for dspi c33fj32gs406 and dspic33fj 64gs406 devices (continued) sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 63 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-8: interrupt controller register map for dspic33fj32gs610 devices sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 0080 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err ? matherr addrerr stkerr oscfail ? 0000 intcon2 0082 altivt disi ? ? ? ? ? ? ? ? ? int4ep int3ep int2ep int1ep int0ep 0000 ifs0 0084 ? ? adif u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if ? t1if oc1if ic1if int0if 0000 ifs1 0086 u2txif u2rxif int2if t5if t4if oc4if oc3if ? ? ? ? int1if cnif ac1if mi2c1if si2c1if 0000 ifs2 0088 ? ? ? ? ? ? ? ? ? ic4if ic3if ? ? ? spi2if spi2eif 0000 ifs3 008a ? ? ? ? ? qei1if psemif ? ? int4if int3if ? ? mi2c2if si2c2if ? 0000 ifs4 008c ? ? ? ?qei2if ? psesmif ? ? ? ? ? ?u2eifu1eif ? 0000 ifs5 008e pwm2if pwm1if adcp12if ? ? ? ? ? ? ? ? adcp11if adcp10if adcp9if adcp8if ? 0000 ifs6 0090 adcp1if adcp0if ? ? ? ? ac4if ac3if ac2if pwm9if pwm8if pwm7if pwm6if pwm5if pwm4if pwm3if 0000 ifs7 0092 ? ? ? ? ? ? ? ? ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if 0000 iec0 0094 ? ? adie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie ? t1ie oc1ie ic1ie int0ie 0000 iec1 0096 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie ? ? ? ? int1ie cnie ac1ie mi2c1ie si2c1ie 0000 iec2 0098 ? ? ? ? ? ? ? ? ? ic4ie ic3ie ? ? ? spi2ie spi2eie 0000 iec3 009a ? ? ? ? ? qei1ie psemie ? ? int4ie int3ie ? ? mi2c2ie si2c2ie ? 0000 iec4 009c ? ? ? ?qei2ie ? psesmie ? ? ? ? ? ?u2eieu1eie ? 0000 iec5 009e pwm2ie pwm1ie adcp12ie ? ? ? ? ? ? ? ? adcp11ie adcp10ie adcp9ie adcp8ie ? 0000 iec6 00a0 adcp1ie adcp0ie ? ? ? ? ac4ie ac3ie ac2ie pwm9ie pwm8ie pwm7ie pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec7 00a2 ? ? ? ? ? ? ? ? ? ? adcp7ie adcp6ie adcp5ie a dcp4ie adcp3ie adcp2ie 0000 ipc0 00a4 ? t1ip<2:0> ?oc1ip<2:0> ?ic1ip<2:0> ? int0ip<2:0> 4444 ipc1 00a6 ? t2ip<2:0> ?oc2ip<2:0> ?ic2ip<2:0> ? ? ? ? 4440 ipc2 00a8 ? u1rxip<2:0> ? spi1ip<2:0> ? spi1eip<2:0> ? t3ip<2:0> 4444 ipc3 00aa ? ? ? ? ? ? ? ? ? adip<2:0> ? u1txip<2:0> 0044 ipc4 00ac ? cnip<2:0> ?ac1ip<2:0> ? mi2c1ip<2:0> ? si2c1ip<2:0> 4444 ipc5 00ae ? ? ? ? ? ? ? ? ? ? ? ? ? int1ip<2:0> 0004 ipc6 00b0 ? t4ip<2:0> ?oc4ip<2:0> ?oc3ip<2:0> ? ? ? ? 4440 ipc7 00b2 ? u2txip<2:0> ? u2rxip<2:0> ? int2ip<2:0> ? t5ip<2:0> 4444 ipc8 00b4 ? ? ? ? ? ? ? ? ? spi2ip<2:0> ? spi2eip<2:0> 0044 ipc9 00b6 ? ? ? ? ?ic4ip<2:0> ?ic3ip<2:0> ? ? ? ? 0440 ipc12 00bc ? ? ? ? ? mi2c2ip<2:0> ? si2c2ip<2:0> ? ? ? ? 0440 ipc13 00be ? ? ? ? ? int4ip<2:0> ? int3ip<2:0> ? ? ? ? 0440 ipc14 00c0 ? ? ? ? ? qei1ip<2:0> ? psemip<2:0> ? ? ? ? 0440 ipc16 00c4 ? ? ? ? ?u2eip<2:0> ? u1eip<2:0> ? ? ? ? 0440 ipc18 00c8 ? qei2ip<2:0> ? ? ? ? ? psesmip<2:0> ? ? ? ? 4040 ipc20 00cc ? adcp10ip<2:0> ? adcp9ip<2:0> ? adcp8ip<2:0> ? ? ? ? 4440 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 64 ? 2009-2012 microchip technology inc. ipc21 00ce ? ? ? ? ? ? ? ? ? adcp12ip<2:0> ? adcp11ip<2:0> 0044 ipc23 00d2 ? pwm2ip<2:0> ? pwm1ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc24 00d4 ? pwm6ip<2:0> ? pwm5ip<2:0> ? pwm4ip<2:0> ? pwm3ip<2:0> 4444 ipc25 00d6 ?ac2ip<2:0> ? pwm9ip<2:0> ? pwm8ip<2:0> ? pwm7ip<2:0> 4444 ipc26 00d8 ? ? ? ? ? ? ? ? ? ac4ip<2:0> ? ac3ip<2:0> 0044 ipc27 00da ? adcp1ip<2:0> ? adcp0ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc28 00dc ? adcp5ip<2:0> ? adcp4ip<2:0> ? adcp3ip<2:0> ? adcp2ip<2:0> 4444 ipc29 00de ? ? ? ? ? ? ? ? ? adcp7ip<2:0> ? adcp6ip<2:0> 0044 inttreg 00e0 ? ? ? ?ilr<3:0> ? vecnum<6:0> 0000 table 4-8: interrupt controller register ma p for dspic33fj32gs610 devices (continued) sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 65 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-9: interrupt controller re gister map for dspic33fj32gs608 sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 0080 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err ? matherr addrerr stkerr oscfail ? 0000 intcon2 0082 altivt disi ? ? ? ? ? ? ? ? ? int4ep int3ep int2ep int1ep int0ep 0000 ifs0 0084 ? ? adif u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if ? t1if oc1if ic1if int0if 0000 ifs1 0086 u2txif u2rxif int2if t5if t4if oc4if oc3if ? ? ? ? int1if cnif ac1if mi2c1if si2c1if 0000 ifs2 0088 ? ? ? ? ? ? ? ? ? ic4if ic3if ? ? ? spi2if spi2eif 0000 ifs3 008a ? ? ? ? ?qei1ifpsemif ? ? int4if int3if ? ? mi2c2if si2c2if ? 0000 ifs4 008c ? ? ? ? qei2if ? psesmif ? ? ? ? ? ?u2eifu1eif ? 0000 ifs5 008e pwm2if pwm1if adcp12if ? ? ? ? ? ? ? ? ? ? ? adcp8if ? 0000 ifs6 0090 adcp1if adcp0if ? ? ? ? ac4if ac3if ac2if ? pwm8if pwm7if pwm6if pwm5if pwm4if pwm3if 0000 ifs7 0092 ? ? ? ? ? ? ? ? ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if 0000 iec0 0094 ? ? adie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie ? t1ie oc1ie ic1ie int0ie 0000 iec1 0096 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie ? ? ? ? int1ie cnie ? mi2c1ie si2c1ie 0000 iec2 0098 ? ? ? ? ? ? ? ? ?ic4ieic3ie ? ? ?spi2iespi2eie 0000 iec3 009a ? ? ? ? ? qei1ie psemie ? ? int4ie int3ie ? ?mi2c2iesi2c2ie ? 0000 iec4 009c ? ? ? ? qei2ie ? psesmie ? ? ? ? ? ?u2eieu1eie ? 0000 iec5 009e pwm2ie pwm1ie adcp12ie ? ? ? ? ? ? ? ? ? ? ? adcp8ie ? 0000 iec6 00a0 adcp1ie adcp0ie ? ? ? ? ac4ie ac3ie ac2ie ? pwm8ie pwm7ie pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec7 00a2 ? ? ? ? ? ? ? ? ? ? adcp7ie adcp6ie adcp5ie adcp4ie adcp3ie adcp2ie 0000 ipc0 00a4 ? t1ip<2:0> ? oc1ip<2:0> ? ic1ip<2:0> ? int0ip<2:0> 4444 ipc1 00a6 ? t2ip<2:0> ? oc2ip<2:0> ? ic2ip<2:0> ? ? ? ? 4440 ipc2 00a8 ? u1rxip<2:0> ? spi1ip<2:0> ? spi1eip<2:0> ? t3ip<2:0> 4444 ipc3 00aa ? ? ? ? ? ? ? ? ? adip<2:0> ? u1txip<2:0> 0044 ipc4 00ac ?cnip<2:0> ?ac1ip<2:0> ? mi2c1ip<2:0> ? si2c1ip<2:0> 4444 ipc5 00ae ? ? ? ? ? ? ? ? ? ? ? ? ? int1ip<2:0> 0004 ipc6 00b0 ? t4ip<2:0> ? oc4ip<2:0> ?oc3ip<2:0> ? ? ? ? 4440 ipc7 00b2 ? u2txip<2:0> ? u2rxip<2:0> ? int2ip<2:0> ? t5ip<2:0> 4444 ipc8 00b4 ? ? ? ? ? ? ? ? ? spi2ip<2:0> ? spi2eip<2:0> 0044 ipc9 00b6 ? ? ? ? ?ic4ip<2:0> ? ic3ip<2:0> ? ? ? ? 0440 ipc12 00bc ? ? ? ? ? mi2c2ip<2:0> ? si2c2ip<2:0> ? ? ? ? 0440 ipc13 00be ? ? ? ? ? int4ip<2:0> ? int3ip<2:0> ? ? ? ? 0440 ipc14 00c0 ? ? ? ? ? qei1ip<2:0> ? psemip<2:0> ? ? ? ? 0440 ipc16 00c4 ? ? ? ? ?u2eip<2:0> ? u1eip<2:0> ? ? ? ? 0440 ipc18 00c8 ? qei2ip<2:0> ? ? ? ? ? psesmip<2:0> ? ? ? ? 4040 ipc20 00cc ? ? ? ? ? ? ? ? ? adcp8ip<2:0> ? ? ? ? 0040 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 66 ? 2009-2012 microchip technology inc. ipc21 00ce ? ? ? ? ? ? ? ? ? adcp12ip<2:0> ? ? ? ? 0040 ipc23 00d2 ? pwm2ip<2:0> ? pwm1ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc24 00d4 ? pwm6ip<2:0> ? pwm5ip<2:0> ? pwm4ip<2:0> ? pwm3ip<2:0> 4444 ipc25 00d6 ? ac2ip<2:0> ? ? ? ? ? pwm8ip<2:0> ? pwm7ip<2:0> 4044 ipc26 00d8 ? ? ? ? ? ? ? ? ? ac4ip<2:0> ?ac3ip<2:0> 0044 ipc27 00da ? adcp1ip<2:0> ?adcp0ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc28 00dc ? adcp5ip<2:0> ?adcp4ip<2:0> ? adcp3ip<2:0> ? adcp2ip<2:0> 4444 ipc29 00de ? ? ? ? ? ? ? ? ? adcp7ip<2:0> ? adcp6ip<2:0> 0044 inttreg 00e0 ? ? ? ?ilr<3:0> ? vecnum<6:0> 0000 table 4-9: interrupt controller register map for dspic33fj32gs608 (continued) sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 67 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-10: interrupt controller register map for dspic33fj32gs606 devices sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 0080 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err ? matherr addrerr stkerr oscfail ? 0000 intcon2 0082 altivt disi ? ? ? ? ? ? ? ? ? int4ep int3ep int2ep int1ep int0ep 0000 ifs0 0084 ? ? adif u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if ? t1if oc1if ic1if int0if 0000 ifs1 0086 u2txif u2rxif int2if t5if t4if oc4if oc3if ? ? ? ? int1if cnif ac1if mi2c1if si2c1if 0000 ifs2 0088 ? ? ? ? ? ? ? ? ?ic4ific3if ? ? ? spi2if spi2eif 0000 ifs3 008a ? ? ? ? ? qei1if psemif ? ? int4if int3if ? ? mi2c2if si2c2if ? 0000 ifs4 008c ? ? ? ?qei2if ? psesmif ? ? ? ? ? ?u2eifu1eif ? 0000 ifs5 008e pwm2if pwm1if adcp12if ? ? ? ? ? ? ? ? ? ? ? ? ? 0000 ifs6 0090 adcp1if adcp0if ? ? ? ? ac4if ac3if ac2if ? ? ? pwm6if pwm5if pwm4if pwm3if 0000 ifs7 0092 ? ? ? ? ? ? ? ? ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if 0000 iec0 0094 ? ? adie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie ? t1ie oc1ie ic1ie int0ie 0000 iec1 0096 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie ? ? ? ? int1ie cnie ac1ie mi2c1ie si2c1ie 0000 iec2 0098 ? ? ? ? ? ? ? ? ? ic4ie ic3ie ? ? ? spi2ie spi2eie 0000 iec3 009a ? ? ? ? ? qei1ie psemie ? ? int4ie int3ie ? ? mi2c2ie si2c2ie ? 0000 iec4 009c ? ? ? ?qei2ie ? psesmie ? ? ? ? ? ?u2eieu1eie ? 0000 iec5 009e pwm2ie pwm1ie adcp12ie ? ? ?? ? ? ? ? ? ? ? ? ? 0000 iec6 00a0 adcp1ie adcp0ie ? ? ? ? ac4ie ac3ie ac2ie ? ? ? pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec7 00a2 ? ? ? ? ? ? ? ? ? ? adcp7ie adcp6ie adcp5ie adcp4ie adcp3ie adcp2ie 0000 ipc0 00a4 ? t1ip<2:0> ? oc1ip<2:0> ?ic1ip<2:0> ? int0ip<2:0> 4444 ipc1 00a6 ? t2ip<2:0> ? oc2ip<2:0> ?ic2ip<2:0> ? ? ? ? 4440 ipc2 00a8 ? u1rxip<2:0> ? spi1ip<2:0> ? spi1eip<2:0> ? t3ip<2:0> 4444 ipc3 00aa ? ? ? ? ? ? ? ? ? adip<2:0> ? u1txip<2:0> 0044 ipc4 00ac ? cnip<2:0> ?ac1ip<2:0> ? mi2c1ip<2:0> ? si2c1ip<2:0> 4444 ipc5 00ae ? ? ? ? ? ? ? ? ? ? ? ? ? int1ip<2:0> 0004 ipc6 00b0 ? t4ip<2:0> ? oc4ip<2:0> ?oc3ip<2:0> ? ? ? ? 4440 ipc7 00b2 ? u2txip<2:0> ? u2rxip<2:0> ? int2ip<2:0> ? t5ip<2:0> 4444 ipc8 00b4 ? ? ? ? ? ? ? ? ? spi2ip<2:0> ? spi2eip<2:0> 0044 ipc9 00b6 ? ? ? ? ?ic4ip<2:0> ?ic3ip<2:0> ? ? ? ? 0440 ipc12 00bc ? ? ? ? ? mi2c2ip<2:0> ? si2c2ip<2:0> ? ? ? ? 0440 ipc13 00be ? ? ? ? ? int4ip<2:0> ? int3ip<2:0> ? ? ? ? 0440 ipc14 00c0 ? ? ? ? ? qei1ip<2:0> ? psemip<2:0> ? ? ? ? 0440 ipc16 00c4 ? ? ? ? ?u2eip<2:0> ?u1eip<2:0> ? ? ? ? 0440 ipc18 00c8 ? qei2ip<2:0> ? ? ? ? ? psesmip<2:0> ? ? ? ? 4040 ipc21 00ce ? ? ? ? ? ? ? ? ? adcp12ip<2:0> ? ? ? ? 0040 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 68 ? 2009-2012 microchip technology inc. ipc23 00d2 ? pwm2ip<2:0> ? pwm1ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc24 00d4 ? pwm6ip<2:0> ? pwm5ip<2:0> ? pwm4ip<2:0> ? pwm3ip<2:0> 4444 ipc25 00d6 ? ac2ip<2:0> ? ? ? ? ? ? ? ? ? ? ? ? 4000 ipc26 00d8 ? ? ? ? ? ? ? ? ?ac4ip<2:0> ?ac3ip<2:0> 0044 ipc27 00da ? adcp1ip<2:0> ?adcp0ip<2:0> ? ? ? ? ? ? ? ? 4400 ipc28 00dc ? adcp5ip<2:0> ?adcp4ip<2:0> ? adcp3ip<2:0> ? adcp2ip<2:0> 4444 ipc29 00de ? ? ? ? ? ? ? ? ? adcp7ip<2:0> ? adcp6ip<2:0> 0004 inttreg 00e0 ? ? ? ?ilr<3:0> ? vecnum<6:0> 0000 table 4-10: interrupt controller register ma p for dspic33fj32gs606 devices (continued) sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 69 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-11: timers register map table 4-12: input capture register map sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets tmr1 0100 timer1 register 0000 pr1 0102 period register 1 ffff t1con 0104 ton ?tsidl ? ? ? ? ? ? tgate tckps<1:0> ?tsynctcs ? 0000 tmr2 0106 timer2 register 0000 tmr3hld 0108 timer3 holding register (for 32-bit timer operations only) xxxx tmr3 010a timer3 register 0000 pr2 010c period register 2 ffff pr3 010e period register 3 ffff t2con 0110 ton ?tsidl ? ? ? ? ? ? tgate tckps<1:0> t32 ?tcs ? 0000 t3con 0112 ton ?tsidl ? ? ? ? ? ? tgate tckps<1:0> ? ?tcs ? 0000 tmr4 0114 timer4 register 0000 tmr5hld 0116 timer5 holding register (for 32-bit timer operations only) xxxx tmr5 0118 timer5 register 0000 pr4 011a period register 4 ffff pr5 011c period register 5 ffff t4con 011e ton ?tsidl ? ? ? ? ? ? tgate tckps<1:0> t32 ?tcs ? 0000 t5con 0120 ton ?tsidl ? ? ? ? ? ? tgate tckps<1:0> ? ?tcs ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets ic1buf 0140 input 1 capture register xxxx ic1con 0142 ? ?icsidl ? ? ? ? ? ictmr ici<1:0> icov icbne icm<2:0> 0000 ic2buf 0144 input 2 capture register xxxx ic2con 0146 ? ?icsidl ? ? ? ? ? ictmr ici<1:0> icov icbne icm<2:0> 0000 ic3buf 0148 input 3 capture register xxxx ic3con 014a ? ?icsidl ? ? ? ? ? ictmr ici<1:0> icov icbne icm<2:0> 0000 ic4buf 014c input 4 capture register xxxx ic4con 014e ? ?icsidl ? ? ? ? ? ictmr ici<1:0> icov icbne icm<2:0> 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 70 ? 2009-2012 microchip technology inc. table 4-13: output compare register map sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets oc1rs 0180 output compare 1 secondary register xxxx oc1r 0182 output compare 1 register xxxx oc1con 0184 ? ?ocsidl ? ? ? ? ? ? ? ? ocflt octsel ocm<2:0> 0000 oc2rs 0186 output compare 2 secondary register xxxx oc2r 0188 output compare 2 register xxxx oc2con 018a ? ?ocsidl ? ? ? ? ? ? ? ? ocflt octsel ocm<2:0> 0000 oc3rs 018c output compare 3 secondary register xxxx oc3r 018e output compare 3 register xxxx oc3con 0190 ? ?ocsidl ? ? ? ? ? ? ? ? ocflt octsel ocm<2:0> 0000 oc4rs 0192 output compare 4 secondary register xxxx oc4r 0194 output compare 4 register xxxx oc4con 0196 ? ?ocsidl ? ? ? ? ? ? ? ? ocflt octsel ocm<2:0> 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. table 4-14: qei1 register map sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets qei1con 01e0 cnterr ? qeisidl indx updn qeim<2:0> swpab pcdout tqgate tqckps<1:0> posres tqcs updn_src 0000 dflt1con 01e2 ? ? ? ? ? imv<1:0> ceid qeout qeck<2:0> ? ? ? ? 0000 pos1cnt 01e4 position counter<15:0> 0000 max1cnt 01e6 maximum count<15:0> ffff legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. table 4-15: qei2 register map sfr name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets qei2con 01f0 cnterr ? qeisidl indx updn qeim<2:0> swpab pcdout tqgate tqckps<1:0> posres tqcs updn_src 0000 dflt2con 01f2 ? ? ? ? ? imv<1:0> ceid qeout qeck<2:0> ? ? ? ? 0000 pos2cnt 01f4 position counter<15:0> 0000 max2cnt 01f6 maximum count<15:0> ffff legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 71 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-16: high-speed pwm register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets ptcon 0400 pten ? ptsidl sestat seien eipu syncpol syncoen syncen syncsrc<2:0> sevtps<3:0> 0000 ptcon2 0402 ? ? ? ? ? ? ? ? ? ? ? ? ?pclkdiv<2:0> 0000 ptper 0404 ptper<15:0> fff8 sevtcmp 0406 sevtcmp<15:3> ? ? ? 0000 mdc 040a mdc<15:0> 0000 stcon 040e ? ? ? sestat seien eipu syncpol syncoen syncen syncsrc<2:0> sevtps<3:0> 0000 stcon2 0410 ? ? ? ? ? ? ? ? ? ? ? ? ?pclkdiv<2:0> 0000 stper 0412 stper<15:0> fff8 ssevtcmp 0414 ssevtcmp<15:3> ? ? ? 0000 chop 041a chpclken ? ? ? ? ? chop<9:3> ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. table 4-17: high-speed pwm generator 1 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon1 0420 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon1 0422 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon1 0424 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc1 0426 pdc1<15:0> 0000 phase1 0428 phase1<15:0> 0000 dtr1 042a ? ? dtr1<13:0> 0000 altdtr1 042c ? ? altdtr1<13:0> 0000 sdc1 042e sdc1<15:0> 0000 sphase1 0430 sphase1<15:0> 0000 trig1 0432 trgcmp<15:3> ? ? ? 0000 trgcon1 0434 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig1 0436 strgcmp<15:3> ? ? ? 0000 pwmcap1 0438 pwmcap1<15:3> ? ? ? 0000 lebcon1 043a phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly1 043c ? ? ? ?leb<11:3> ? ? ? 0000 auxcon1 043e hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 72 ? 2009-2012 microchip technology inc. table 4-18: high-speed pwm generator 2 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon2 0440 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon2 0442 penh penl polh poll pmod<1:0> ovrenh ovre nl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon2 0444 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc2 0446 pdc2<15:0> 0000 phase2 0448 phase2<15:0> 0000 dtr2 044a ? ? dtr2<13:0> 0000 altdtr2 044c ? ? altdtr2<13:0> 0000 sdc2 044e sdc2<15:0> 0000 sphase2 0450 sphase2<15:0> 0000 trig2 0452 trgcmp<15:3> ? ? ? 0000 trgcon2 0454 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig2 0456 strgcmp<15:3> ? ? ? 0000 pwmcap2 0458 pwmcap2<15:3> ? ? ? 0000 lebcon2 045a phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly2 045c ? ? ? ? leb<11:3> ? ? ? 0000 auxcon2 045e hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 73 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-19: high-speed pwm generator 3 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon3 0460 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon3 0462 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon3 0464 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc3 0466 pdc3<15:0> 0000 phase3 0468 phase3<15:0> 0000 dtr3 046c ? ? dtr3<13:0> 0000 altdtr3 046c ? ? altdtr3<13:0> 0000 sdc3 046e sdc3<15:0> 0000 sphase3 0470 sphase3<15:0> 0000 trig3 0472 trgcmp<15:3> ? ? ? 0000 trgcon3 0474 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig3 0476 strgcmp<15:3> ? ? ? 0000 pwmcap3 0478 pwmcap3<15:3> ? ? ? 0000 lebcon3 047a phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly3 047c ? ? ? ?leb<11:3> ? ? ? 0000 auxcon3 047e hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 74 ? 2009-2012 microchip technology inc. table 4-20: high-speed pwm generator 4 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon4 0480 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon4 0482 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon4 0484 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc4 0486 pdc4<15:0> 0000 phase4 0488 phase4<15:0> 0000 dtr4 048a ? ? dtr4<13:0> 0000 altdtr4 048a ? ? altdtr4<13:0> 0000 sdc4 048e sdc4<15:0> 0000 sphase4 0490 sphase4<15:0> 0000 trig4 0492 trgcmp<15:3> ? ? ? 0000 trgcon4 0494 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig4 0496 strgcmp<15:3> ? ? ? 0000 pwmcap4 0498 pwmcap4<15:3> ? ? ? 0000 lebcon4 049a phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly4 049c ? ? ? ? leb<11:3> ? ? ? 0000 auxcon4 049e hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 75 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-21: high-speed pwm generator 5 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon5 04a0 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon5 04a2 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon5 04a4 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc5 04a6 pdc5<15:0> 0000 phase5 04a8 phase5<15:0> 0000 dtr5 04aa ? ? dtr5<13:0> 0000 altdtr5 04aa ? ? altdtr5<13:0> 0000 sdc5 04ae sdc5<15:0> 0000 sphase5 04b0 sphase5<15:0> 0000 trig5 04b2 trgcmp<15:3> ? ? ? 0000 trgcon5 04b4 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig5 04b6 strgcmp<15:3> ? ? ? 0000 pwmcap5 04b8 pwmcap5<15:3> ? ? ? 0000 lebcon5 04ba phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly5 04bc ? ? ? ? leb<11:3> ? ? ? 0000 auxcon5 04be hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 76 ? 2009-2012 microchip technology inc. table 4-22: high-speed pwm generator 6 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon6 04c0 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon6 04c2 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon6 04c4 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc6 04c6 pdc6<15:0> 0000 phase6 04c8 phase6<15:0> 0000 dtr6 04ca ? ? dtr6<13:0> 0000 altdtr6 04ca ? ? altdtr6<13:0> 0000 sdc6 04ce sdc6<15:0> 0000 sphase6 04d0 sphase6<15:0> 0000 trig6 04d2 trgcmp<15:3> ? ? ? 0000 trgcon6 04d4 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig6 04d6 strgcmp<15:3> ? ? ? 0000 pwmcap6 04d8 pwmcap6<15:3> ? ? ? 0000 lebcon6 04da phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly6 04dc ? ? ? ? leb<11:3> ? ? ? 0000 auxcon6 04de hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 77 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-23: high-speed pwm generator 7 register map (excludes dspic33fj3 2gs406 and dspic33fj64gs406 devices) file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon7 04e0 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon7 04e2 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon7 04e4 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc7 04e6 pdc7<15:0> 0000 phase7 04e8 phase7<15:0> 0000 dtr7 04ea ? ? dtr7<13:0> 0000 altdtr7 04ea ? ? altdtr7<13:0> 0000 sdc7 04ee sdc7<15:0> 0000 sphase7 04f0 sphase7<15:0> 0000 trig7 04f2 trgcmp<15:3> ? ? ? 0000 trgcon7 04f4 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig7 04f6 strgcmp<15:3> ? ? ? 0000 pwmcap7 04f8 pwmcap7<15:3> ? ? ? 0000 lebcon7 04fa phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly7 04fc ? ? ? ? leb<11:3> ? ? ? 0000 auxcon7 04fe hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 78 ? 2009-2012 microchip technology inc. table 4-24: high-speed pwm generator 8 register map (excludes dspic33fj3 2gs406 and dspic33fj64gs406 devices) file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon8 0500 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon8 0502 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon8 0504 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc8 0506 pdc8<15:0> 0000 phase8 0508 phase8<15:0> 0000 dtr8 050a ? ? dtr8<13:0> 0000 altdtr8 050a ? ? altdtr8<13:0> 0000 sdc8 050e sdc8<15:0> 0000 sphase8 0510 sphase8<15:0> 0000 trig8 0512 trgcmp<15:3> ? ? ? 0000 trgcon8 0514 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig8 0516 strgcmp<15:3> ? ? ? 0000 pwmcap8 0518 pwmcap8<15:3> ? ? ? 0000 lebcon8 051a phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly8 051c ? ? ? ? leb<11:3> ? ? ? 0000 auxcon8 051e hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 79 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-25: high-speed pwm generato r 9 register map for dspic33fj32gs610 and ds pic33fj64gs610 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon9 0520 fltstat clstat trgstat fltien clien trgien itb mdcs dtc<1:0> dtcp ? mtbs cam xpres iue 0000 iocon9 0522 penh penl polh poll pmod<1:0> ovrenh ovrenl ovrdat<1:0> fltdat<1:0> cldat<1:0> swap osync 0000 fclcon9 0524 ifltmod clsrc<4:0> clpol clmod fltsrc<4:0> fltpol fltmod<1:0> 0000 pdc9 0526 pdc9<15:0> 0000 phase9 0528 phase9<15:0> 0000 dtr9 052a ? ? dtr9<13:0> 0000 altdtr9 052a ? ? altdtr9<13:0> 0000 sdc9 052e sdc9<15:0> 0000 sphase9 0530 sphase9<15:0> 0000 trig9 0532 trgcmp<15:3> ? ? ? 0000 trgcon9 0534 trgdiv<3:0> ? ? ? ?dtm ?trgstrt<5:0> 0000 strig9 0536 strgcmp<15:3> ? ? ? 0000 pwmcap9 0538 pwmcap9<15:3> ? ? ? 0000 lebcon9 053a phr phf plr plf fltleben clleben ? ? ? ? bch bcl bphh bphl bplh bpll 0000 lebdly9 053c ? ? ? ? leb<11:3> ? ? ? 0000 auxcon9 053e hrpdis hrddis ? ? blanksel<3:0> ? ? chopsel<3:0> chophen choplen 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. table 4-26: i2c1 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets i2c1rcv 0200 ? ? ? ? ? ? ? ? receive register 0000 i2c1trn 0202 ? ? ? ? ? ? ? ? transmit register 00ff i2c1brg 0204 ? ? ? ? ? ? ? baud rate generator register 0000 i2c1con 0206 i2cen ? i2csidl sclrel ipmien a10m disslw smen gcen stren ackdt acken rcen pen rsen sen 1000 i2c1stat 0208 ackstat trstat ? ? ? bcl gcstat add10 iwcol i2cov d_a p s r_w rbf tbf 0000 i2c1add 020a ? ? ? ? ? ? address register 0000 i2c1msk 020c ? ? ? ? ? ? address mask register 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 80 ? 2009-2012 microchip technology inc. table 4-28: uart1 register map table 4-27: i2c2 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets i2c2rcv 0210 ? ? ? ? ? ? ? ? receive register 0000 i2c2trn 0212 ? ? ? ? ? ? ? ? transmit register 00ff i2c2brg 0214 ? ? ? ? ? ? ? baud rate generator register 0000 i2c2con 0216 i2cen ? i2csidl sclrel ipmien a10m disslw smen gcen stren ackdt acken rcen pen rsen sen 1000 i2c2stat 0218 ackstat trstat ? ? ? bcl gcstat add10 iwcol i2cov d_a p s r_w rbf tbf 0000 i2c2add 021a ? ? ? ? ? ? address register 0000 i2c2msk 021c ? ? ? ? ? ? address mask register 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15bit 14bit 13bit 12bit 11bit 10bit 9bit 8bit 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0 all resets u1mode 0220 uarten ? usidl iren rtsmd ? uen1 uen0 wake lpback abaud urxinv brgh pdsel<1:0> stsel 0000 u1sta 0222 utxisel1 utxinv utxisel0 ? utxbrk utxen utxbf trmt urxisel<1:0> adden ridle perr ferr oerr urxda 0110 u1txreg 0224 ? ? ? ? ? ? ? uart transmit register xxxx u1rxreg 0226 ? ? ? ? ? ? ? uart receive register 0000 u1brg 0228 baud rate generator prescaler 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. table 4-29: uart2 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets u2mode 0230 uarten ? usidl iren rtsmd ? uen1 uen0 wake lpback abaud urxinv brgh pdsel<1:0> stsel 0000 u2sta 0232 utxisel 1 utxinv utxisel0 ? utxbrk utxen utxbf trmt urxisel<1:0> adden ridle perr ferr oerr urxda 0110 u2txreg 0234 ? ? ? ? ? ? ? uart transmit register xxxx u2rxreg 0236 ? ? ? ? ? ? ? uart receive register 0000 u2brg 0238 baud rate generator prescaler 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 81 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-30: spi1 register map table 4-31: spi2 register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets spi1stat 0240 spien ? spisidl ? ? ? ? ? ?spirov ? ? ? ? spitbf spirbf 0000 spi1con1 0242 ? ? ? dissck dissdo mode16 smp cke ssen ckp msten spre<2:0> ppre<1:0> 0000 spi1con2 0244 frmen spifsd frmpol ? ? ? ? ? ? ? ? ? ? ? frmdly ? 0000 spi1buf 0248 spi1 transmit and receive buffer register 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets spi2stat 0260 spien ? spisidl ? ? ? ? ? ?spirov ? ? ? ? spitbf spirbf 0000 spi2con1 0262 ? ? ? dissck dissdo mode16 smp cke ssen ckp msten spre<2:0> ppre<1:0> 0000 spi2con2 0264 frmen spifsd frmpol ? ? ? ? ? ? ? ? ? ? ? frmdly ? 0000 spi2buf 0268 spi2 transmit and receive buffer register 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 82 ? 2009-2012 microchip technology inc. table 4-32: high-speed 10-bit adc register map for dspic33fj32gs610 and dspic33fj64gs 610 devices only file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets adcon 0300 adon ? adsidl slowclk ?gswtrg ? form eie order seqsamp asyncsamp ? adcs<2:0> 0003 adpcfg 0302 pcfg15 pcfg14 pcfg13 pcfg12 pcfg11 pcfg10 pc fg9 pcfg8 pcfg7 pcfg6 pcfg5 pcfg4 pcfg3 pcfg2 pcfg1 pcfg0 0000 adpcfg2 0304 ? ? ? ? ? ? ? ? pcfg23 pcfg22 pcfg21 pcfg20 pcfg19 pcfg18 pcfg17 pcfg16 0000 adstat 0306 ? ? ? p12rdy p11rdy p10rdy p9rdy p8rdy p7rdy p6rdy p5rdy p4rdy p3rdy p2rdy p1rdy p0rdy 0000 adbase 0308 adbase<15:1> ? 0000 adcpc0 030a irqen1 pend1 swtrg1 trgsrc1<4:0> irqen0 pend0 swtrg0 trgsrc0<4:0> 0000 adcpc1 030c irqen3 pend3 swtrg3 trgsrc3<4:0> irqen2 pend2 swtrg2 trgsrc2<4:0> 0000 adcpc2 030e irqen5 pend5 swtrg5 trgsrc5<4:0> irqen4 pend4 swtrg4 trgsrc4<4:0> 0000 adcpc3 0310 irqen7 pend7 swtrg7 trgsrc7<4 :0> irqen6 pend6 swtrg6 trgsrc6<4:0> 0000 adcpc4 0312 irqen9 pend9 swtrg9 trgsrc9<4 :0> irqen8 pend8 swtrg8 trgsrc8<4:0> 0000 adcpc5 0314 irqen11 pend11 swtrg11 trgsrc11< 4:0> irqen10 pend10 swtrg10 trgsrc10<4:0> 0000 adcpc6 0316 ? ? ? ? ? ? ? ? irqen12 pend12 swtrg12 trgsrc12<4:0> 0000 adcbuf0 0340 adc data buffer 0 xxxx adcbuf1 0342 adc data buffer 1 xxxx adcbuf2 0344 adc data buffer 2 xxxx adcbuf3 0346 adc data buffer 3 xxxx adcbuf4 0348 adc data buffer 4 xxxx adcbuf5 034a adc data buffer 5 xxxx adcbuf6 034c adc data buffer 6 xxxx adcbuf7 034e adc data buffer 7 xxxx adcbuf8 0350 adc data buffer 8 xxxx adcbuf9 0352 adc data buffer 9 xxxx adcbuf10 0354 adc data buffer 10 xxxx adcbuf11 0356 adc data buffer 11 xxxx adcbuf12 0358 adc data buffer 12 xxxx adcbuf13 035a adc data buffer 13 xxxx adcbuf14 035c adc data buffer 14 xxxx adcbuf15 035e adc data buffer 15 xxxx adcbuf16 0360 adc data buffer 16 xxxx adcbuf17 0362 adc data buffer 17 xxxx adcbuf18 0364 adc data buffer 18 xxxx adcbuf19 0366 adc data buffer 19 xxxx adcbuf20 0368 adc data buffer 20 xxxx adcbuf21 036a adc data buffer 21 xxxx legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 83 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 adcbuf22 036c adc data buffer 22 xxxx adcbuf23 036e adc data buffer 23 xxxx adcbuf24 0370 adc data buffer 24 xxxx adcbuf25 0372 adc data buffer 25 xxxx table 4-32: high-speed 10-bit adc regist er map for dspic33fj32gs 610 and dspic33fj64g s610 devices only (continued) file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 84 ? 2009-2012 microchip technology inc. table 4-33: high-speed 10-bit adc register map fo r dspic33fj32gs608 and ds pic33fj64gs608 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets adcon 0300 adon ? adsidl slowclk ?gswtrg ? form eie order seqsamp asyncsamp ? adcs<2:0> 0003 adpcfg 0302 pcfg15 pcfg14 pcfg13 pcfg12 pcfg11 pcfg10 pc fg9 pcfg8 pcfg7 pcfg6 pcfg5 pcfg4 pcfg3 pcfg2 pcfg1 pcfg0 0000 adpcfg2 0304 ? ? ? ? ? ? ? ? ? ? ? ? ? ?pcfg17pcfg16 0000 adstat 0306 ? ? ? p12rdy ? ? ? p8rdy p7rdy p6rdy p5rdy p4rdy p3rdy p2rdy p1rdy p0rdy 0000 adbase 0308 adbase<15:1> ? 0000 adcpc0 030a irqen1 pend1 swtrg1 trgsrc1<4:0> irqen0 pend0 swtrg0 trgsrc0<4:0> 0000 adcpc1 030c irqen3 pend3 swtrg3 trgsrc3<4 :0> irqen2 pend2 swtrg2 trgsrc2<4:0> 0000 adcpc2 030e irqen5 pend5 swtrg5 trgsrc5<4:0> irqen4 pend4 swtrg4 trgsrc4<4:0> 0000 adcpc3 0310 irqen7 pend7 swtrg7 trgsrc7 <4:0> irqen6 pend6 swtrg6 trgsrc6<4:0> 0000 adcpc4 0312 ? ? ? ? ? ? ? ? irqen8 pend8 swtrg8 trgsrc8<4:0> 0000 adcpc6 0316 ? ? ? ? ? ? ? ? irqen12 pend12 swtrg12 trgsrc12<4:0> 0000 adcbuf0 0340 adc data buffer 0 xxxx adcbuf1 0342 adc data buffer 1 xxxx adcbuf2 0344 adc data buffer 2 xxxx adcbuf3 0346 adc data buffer 3 xxxx adcbuf4 0348 adc data buffer 4 xxxx adcbuf5 034a adc data buffer 5 xxxx adcbuf6 034c adc data buffer 6 xxxx adcbuf7 034e adc data buffer 7 xxxx adcbuf8 0350 adc data buffer 8 xxxx adcbuf9 0352 adc data buffer 9 xxxx adcbuf10 0354 adc data buffer 10 xxxx adcbuf11 0356 adc data buffer 11 xxxx adcbuf12 0358 adc data buffer 12 xxxx adcbuf13 035a adc data buffer 13 xxxx adcbuf14 035c adc data buffer 14 xxxx adcbuf15 035e adc data buffer 15 xxxx adcbuf16 0360 adc data buffer 16 xxxx adcbuf17 0362 adc data buffer 17 xxxx adcbuf24 0370 adc data buffer 24 xxxx adcbuf25 0372 adc data buffer 25 xxxx legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 85 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-34: high-speed 10-bit adc register map fo r dspic33fj32gs606 and ds pic33fj64gs606 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets adcon 0300 adon ?adsidlslowclk ?gswtrg ? form eie order seqsamp asyncsamp ? adcs<2:0> 0003 adpcfg 0302 pcfg15 pcfg14 pcfg13 pcfg12 pcfg11 pcfg10 pcfg9 pcfg8 pcfg7 pcfg6 pcfg5 pcfg4 pcfg3 pcfg2 pcfg1 pcfg0 0000 adstat 0306 ? ? ? p12rdy ? ? ? ? p7rdy p6rdy p5rdy p4rdy p3rdy p2rdy p1rdy p0rdy 0000 adbase 0308 adbase<15:1> ? 0000 adcpc0 030a irqen1 pend1 swtrg1 trgsrc1 <4:0> irqen0 pend0 swtrg0 trgsrc0<4:0> 0000 adcpc1 030c irqen3 pend3 swtrg3 trgsrc3<4:0> irqen2 pend2 swtrg2 trgsrc2<4:0> 0000 adcpc2 030e irqen5 pend5 swtrg5 trgsrc5 <4:0> irqen4 pend4 swtrg4 trgsrc4<4:0> 0000 adcpc3 0310 irqen7 pend7 swtrg7 trgsrc7<4 :0> irqen6 pend6 swtrg6 trgsrc6<4:0> 0000 adcpc6 0316 ? ? ? ? ? ? ? ? irqen12 pend12 swtrg12 trgsrc12<4:0> 0000 adcbuf0 0340 adc data buffer 0 xxxx adcbuf1 0342 adc data buffer 1 xxxx adcbuf2 0344 adc data buffer 2 xxxx adcbuf3 0346 adc data buffer 3 xxxx adcbuf4 0348 adc data buffer 4 xxxx adcbuf5 034a adc data buffer 5 xxxx adcbuf6 034c adc data buffer 6 xxxx adcbuf7 034e adc data buffer 7 xxxx adcbuf8 0350 adc data buffer 8 xxxx adcbuf9 0352 adc data buffer 9 xxxx adcbuf10 0354 adc data buffer 10 xxxx adcbuf11 0356 adc data buffer 11 xxxx adcbuf12 0358 adc data buffer 12 xxxx adcbuf13 035a adc data buffer 13 xxxx adcbuf14 035c adc data buffer 14 xxxx adcbuf15 035e adc data buffer 15 xxxx adcbuf24 0370 adc data buffer 24 xxxx adcbuf25 0372 adc data buffer 25 xxxx legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 86 ? 2009-2012 microchip technology inc. table 4-35: high-speed 10-bit adc register map fo r dspic33fj32gs406 and ds pic33fj64gs406 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets adcon 0300 adon ?adsidlslowclk ?gswtrg ? form eie order seqsamp asyncsamp ? adcs<2:0> 0003 adpcfg 0302 pcfg15 pcfg14 pcfg13 pcfg12 pcfg11 pcfg10 pcfg 9 pcfg8 pcfg7 pcfg6 pcfg5 pcfg4 pcfg3 pcfg2 pcfg1 pcfg0 0000 adstat 0306 ? ? ? p12rdy ? ? ? ? p7rdy p6rdy p5rdy p4rdy p3rdy p2rdy p1rdy p0rdy 0000 adbase 0308 adbase<15:1> ? 0000 adcpc0 030a irqen1 pend1 swtrg1 trgsrc1<4 :0> irqen0 pend0 swtrg0 trgsrc0<4:0> 0000 adcpc1 030c irqen3 pend3 swtrg3 trgsrc3<4 :0> irqen2 pend2 swtrg2 trgsrc2<4:0> 0000 adcpc2 030e irqen5 pend5 swtrg5 trgsrc5<4 :0> irqen4 pend4 swtrg4 trgsrc4<4:0> 0000 adcpc3 0310 irqen7 pend7 swtrg7 trgsrc7<4:0> irqen6 pend6 swtrg6 trgsrc6<4:0> 0000 adcbuf0 0340 adc data buffer 0 xxxx adcbuf1 0342 adc data buffer 1 xxxx adcbuf2 0344 adc data buffer 2 xxxx adcbuf3 0346 adc data buffer 3 xxxx adcbuf4 0348 adc data buffer 4 xxxx adcbuf5 034a adc data buffer 5 xxxx adcbuf6 034c adc data buffer 6 xxxx adcbuf7 034e adc data buffer 7 xxxx adcbuf8 0350 adc data buffer 8 xxxx adcbuf9 0352 adc data buffer 9 xxxx adcbuf10 0354 adc data buffer 10 xxxx adcbuf11 0356 adc data buffer 11 xxxx adcbuf12 0358 adc data buffer 12 xxxx adcbuf13 035a adc data buffer 13 xxxx adcbuf14 035c adc data buffer 14 xxxx adcbuf15 035e adc data buffer 15 xxxx legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 87 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-36: dma register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets dma0con 0380 chen size dir half nullw ? ? ? ? ?amode<1:0> ? ? mode<1:0> 0000 dma0req 0382 force ? ? ? ? ? ? ? ? irqsel<6:0> 007f dma0sta 0384 sta<15:0> 0000 dma0stb 0386 stb<15:0> 0000 dma0pad 0388 pad<15:0> 0000 dma0cnt 038a ? ? ? ? ? ? cnt<9:0> 0000 dma1con 038c chen size dir half nullw ? ? ? ? ?amode<1:0> ? ? mode<1:0> 0000 dma1req 038e force ? ? ? ? ? ? ? ? irqsel<6:0> 007f dma1sta 0390 sta<15:0> 0000 dma1stb 0392 stb<15:0> 0000 dma1pad 0394 pad<15:0> 0000 dma1cnt 0396 ? ? ? ? ? ? cnt<9:0> 0000 dma2con 0398 chen size dir half nullw ? ? ? ? ?amode<1:0> ? ? mode<1:0> 0000 dma2req 039a force ? ? ? ? ? ? ? ? irqsel<6:0> 007f dma2sta 039c sta<15:0> 0000 dma2stb 039e stb<15:0> 0000 dma2pad 03a0 pad<15:0> 0000 dma2cnt 03a2 ? ? ? ? ? ? cnt<9:0> 0000 dma3con 03a4 chen size dir half nullw ? ? ? ? ?amode<1:0> ? ? mode<1:0> 0000 dma3req 03a6 force ? ? ? ? ? ? ? ? irqsel<6:0> 007f dma3sta 03a8 sta<15:0> 0000 dma3stb 03aa stb<15:0> 0000 dma3pad 03ac pad<15:0> 0000 dma3cnt 03ae ? ? ? ? ? ? cnt<9:0> 0000 dmacs0 03e0 ? ? ? ? pwcol3 pwcol2 pwcol1 pwcol0 ? ? ? ? xwcol3 xwcol2 xwcol1 xwcol0 0000 dmacs1 03e2 ? ? ? ? lstch<3:0> ? ? ? ? ppst3 ppst2 ppst1 ppst0 0f00 dsadr 03e4 dsadr<15:0> 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 88 ? 2009-2012 microchip technology inc. table 4-37: ecan1 register ma p when win (c1ctrl1<0>) = 0 or 1 file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets c1ctrl1 0600 ? ? csidl abat ? reqop<2:0> opmode<2:0> ? cancap ? ?win 0480 c1ctrl2 0602 ? ? ? ? ? ? ? ? ? ? ? dncnt<4:0> 0000 c1vec 0604 ? ? ? filhit<4:0> ? icode<6:0> 0000 c1fctrl 0606 dmabs<2:0> ? ? ? ? ? ? ? ?fsa<4:0> 0000 c1fifo 0608 ? ?fbp<5:0> ? ? fnrb<5:0> 0000 c1intf 060a ? ? txbo txbp rxbp txwar rxwar ewarn ivrif wakif errif ? fifoif rbovif rbif tbif 0000 c1inte 060c ? ? ? ? ? ? ? ? ivrie wakie errie ? fifoie rbovie rbie tbie 0000 c1ec 060e terrcnt<7:0> rerrcnt<7:0> 0000 c1cfg1 0610 ? ? ? ? ? ? ? ? sjw<1:0> brp<5:0> 0000 c1cfg2 0612 ?wakfil ? ? ? seg2ph<2:0> seg2phts sam seg1ph<2:0> prseg<2:0> 0000 c1fen1 0614 flten15 flten14 flten13 flten12 flten11 flten10 flte n9 flten8 flten7 flten6 flten5 flten4 flten3 flten2 flten1 flten0 ffff c1fmsksel1 0618 f7msk<1:0> f6msk<1:0> f5msk<1:0> f4msk<1:0> f3msk<1:0> f2msk<1:0> f1msk<1:0> f0msk<1:0> 0000 c1fmsksel2 061a f15msk<1:0> f14msk<1:0> f13msk<1:0> f12msk<1:0> f11msk<1:0> f10msk<1:0> f9msk<1:0> f8msk<1:0> 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. table 4-38: ecan1 register ma p when win (c1ctrl1<0>) = 0 file name sfr addr. bit 15bit 14bit 13bit 12bit 11bit 10bit 9bit 8bit 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0 all resets 0600- 061e see definition when win = x c1rxful1 0620 rxful15 rxful14 rxful13 rxful12 rxful11 rxful10 rxful9 rxful8 rxful7 rxful6 rxful5 rxful4 rxful3 rxful2 rxful1 rxful0 0000 c1rxful2 0622 rxful31 rxful30 rxful29 rxful28 rxful27 rxful26 rxful25 rxf ul24 rxful23 rxful22 rxful21 rxful20 rxful19 rxful18 rxful17 rxful16 0000 c1rxovf1 0628 rxovf15 rxovf14 rxovf13 rxovf12 rxovf11 rxovf10 rxov f9 rxovf8 rxovf7 rxovf6 rxovf5 rx ovf4 rxovf3 rxovf2 rxovf1 rxovf0 0000 c1rxovf2 062a rxovf31 rxovf30 rxovf29 rxovf28 rx ovf27 rxovf26 rxovf25 rxovf24 rxovf23 rxovf22 rxovf21 rxovf20 rxovf19 rxovf18 rxovf17 rxovf16 0000 c1tr01con 0630 txen1 txabt1 txlarb1 txerr1 txreq1 rtren1 tx1pri<1:0> txen0 txabt0 txlarb0 txerr0 txreq0 rtren0 tx0pri<1:0> 0000 c1tr23con 0632 txen3 txabt3 txlarb3 txerr3 txreq3 rtren3 tx3pri<1:0> txen2 txabt2 txlarb2 txerr2 txreq2 rtren2 tx2pri<1:0> 0000 c1tr45con 0634 txen5 txabt5 txlarb5 txerr5 txreq5 rtren5 tx5pri<1:0> txen4 txabt4 txlarb4 txerr4 txreq4 rtren4 tx4pri<1:0> 0000 c1tr67con 0636 txen7 txabt7 txlarb7 txerr7 txreq7 rtren7 tx7pri<1:0> txen6 txabt6 txlarb6 txerr6 txreq6 rtren6 tx6pri<1:0> 0000 c1rxd 0640 received data word xxxx c1txd 0642 transmit data word xxxx legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 89 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-39: ecan1 register ma p when win (c1ctrl1<0>) = 1 file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets 0600- 061e see definition when win = x c1bufpnt1 0620 f3bp<3:0> f2bp<3:0> f1bp<3:0> f0bp<3:0> 0000 c1bufpnt2 0622 f7bp<3:0> f6bp<3:0> f5bp<3:0> f4bp<3:0> 0000 c1bufpnt3 0624 f11bp<3:0> f10bp<3:0> f9bp<3:0> f8bp<3:0> 0000 c1bufpnt4 0626 f15bp<3:0> f14bp<3:0> f13bp<3:0> f12bp<3:0> 0000 c1rxm0sid 0630 sid<10:3> sid<2:0> ?mide ?eid<17:16> xxxx c1rxm0eid 0632 eid<15:8> eid<7:0> xxxx c1rxm1sid 0634 sid<10:3> sid<2:0> ?mide ?eid<17:16> xxxx c1rxm1eid 0636 eid<15:8> eid<7:0> xxxx c1rxm2sid 0638 sid<10:3> sid<2:0> ?mide ?eid<17:16> xxxx c1rxm2eid 063a eid<15:8> eid<7:0> xxxx c1rxf0sid 0640 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf0eid 0642 eid<15:8> eid<7:0> xxxx c1rxf1sid 0644 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf1eid 0646 eid<15:8> eid<7:0> xxxx c1rxf2sid 0648 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf2eid 064a eid<15:8> eid<7:0> xxxx c1rxf3sid 064c sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf3eid 064e eid<15:8> eid<7:0> xxxx c1rxf4sid 0650 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf4eid 0652 eid<15:8> eid<7:0> xxxx c1rxf5sid 0654 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf5eid 0656 eid<15:8> eid<7:0> xxxx c1rxf6sid 0658 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf6eid 065a eid<15:8> eid<7:0> xxxx c1rxf7sid 065c sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf7eid 065e eid<15:8> eid<7:0> xxxx c1rxf8sid 0660 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf8eid 0662 eid<15:8> eid<7:0> xxxx c1rxf9sid 0664 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf9eid 0666 eid<15:8> eid<7:0> xxxx c1rxf10sid 0668 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf10eid 066a eid<15:8> eid<7:0> xxxx c1rxf11sid 066c sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 90 ? 2009-2012 microchip technology inc. c1rxf11eid 066e eid<15:8> eid<7:0> xxxx c1rxf12sid 0670 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf12eid 0672 eid<15:8> eid<7:0> xxxx c1rxf13sid 0674 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf13eid 0676 eid<15:8> eid<7:0> xxxx c1rxf14sid 0678 sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf14eid 067a eid<15:8> eid<7:0> xxxx c1rxf15sid 067c sid<10:3> sid<2:0> ?exide ?eid<17:16> xxxx c1rxf15eid 067e eid<15:8> eid<7:0> xxxx table 4-39: ecan1 register ma p when win (c1ctrl1<0>) = 1 (continued) file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 91 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-40: analog comparator control register map table 4-41: porta register map for dspi c33fj32gs610 and dspic33fj64gs610 devices table 4-42: porta register map for dspi c33fj32gs608 and dspic33fj64gs608 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets cmpcon1 0540 cmpon ?cmpsidl ? ? ? ? dacoe insel<1:0> extref ?cmpstat ? cmppol range 0000 cmpdac1 0542 ? ? - ? ? ?cmref<9:0> 0000 cmpcon2 0544 cmpon ?cmpsidl ? ? ? ? dacoe insel<1:0> extref ?cmpstat ? cmppol range 0000 cmpdac2 0546 ? ? - ? ? ?cmref<9:0> 0000 cmpcon3 0548 cmpon ?cmpsidl ? ? ? ? dacoe insel<1:0> extref ?cmpstat ? cmppol range 0000 cmpdac3 054a ? ? - ? ? ?cmref<9:0> 0000 cmpcon4 054c cmpon ?cmpsidl ? ? ? ? dacoe insel<1:0> extref ?cmpstat ? cmppol range 0000 cmpdac4 054e ? ? ? ? ? ?cmref<9:0> 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 02c0 trisa15 trisa14 ? ? ? trisa10 trisa9 ? trisa7 trisa6 trisa5 trisa4 trisa3 trisa2 trisa1 trisa0 c6ff porta 02c2 ra15 ra14 ? ? ? ra10 ra9 ? ra7 ra6 ra5 ra4 ra3 ra2 ra1 ra0 xxxx lata 02c4 lata15 lata14 ? ? ? lata10 lata9 ? lata7 lata6 lata5 lata4 lata3 lata2 lata1 lata0 0000 odca 02c6 odca15 odca14 ? ? ? odca10 odca9 ? ? ? odca5 odca4 ? ? odca1 odca0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 02c0 trisa15 trisa14 ? ? ? trisa10 trisa9 ? ? ? ? ? ? ? ? ? c600 porta 02c2 ra15 ra14 ? ? ? ra10 ra9 ? ? ? ? ? ? ? ? ? xxxx lata 02c4 lata15 lata14 ? ? ? lata10 lata9 ? ? ? ? ? ? ? ? ? 0000 odca 02c6 odca15 odca14 ? ? ? odca10 odca9 ? ? ? ? ? ? ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 92 ? 2009-2012 microchip technology inc. table 4-43: portb register map table 4-44: portc register map for dspi c33fj32gs610 and dspic33fj64gs610 devices table 4-45: portc register map for dspi c33fj32gs608 and dspic33fj64gs608 devices table 4-46: portc register map for dspic33f j32gs406/606 and dspic 33fj64gs406/606 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisb 02c8 trisb15 trisb14 trisb13 trisb12 trisb11 trisb10 trisb9 trisb8 trisb7 trisb6 trisb5 trisb4 trisb3 trisb2 trisb1 trisb0 ffff portb 02ca rb15 rb14 rb13 rb12 rb11 rb10 rb9 rb8 rb7 rb6 rb5 rb4 rb3 rb2 rb1 rb0 xxxx latb 02cc latb15 latb14 latb13 latb12 latb11 latb10 latb9 latb8 latb7 latb6 latb5 latb4 latb3 latb2 latb1 latb0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 02d0 trisc15 trisc14 trisc13 trisc12 ? ? ? ? ? ? ? trisc4 trisc3 trisc2 trisc1 ? f01e portc 02d2 rc15 rc14 rc13 rc12 ? ? ? ? ? ? ? rc4 rc3 rc2 rc1 ? xxxx latc 02d4 latc15 latc14 latc13 latc12 ? ? ? ? ? ? ? latc4 latc3 latc2 latc1 ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 02d0 trisc15 trisc14 trisc13 trisc12 ? ? ? ? ? ? ? ? ? trisc2 trisc1 ? f006 portc 02d2 rc15 rc14 rc13 rc12 ? ? ? ? ? ? ? ? ? rc2 rc1 ? xxxx latc 02d4 latc15 latc14 latc13 latc12 ? ? ? ? ? ? ? ? ?latc2latc1 ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 02d0 trisc15 trisc14 trisc13 trisc12 ? ? ? ? ? ? ? ? ? ? ? ? f000 portc 02d2 rc15 rc14 rc13 rc12 ? ? ? ? ? ? ? ? ? ? ? ? xxxx latc 02d4 latc15 latc14 latc13 latc12 ? ? ? ? ? ? ? ? ? ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 93 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-47: portd register map for dspic33fj3 2gs608/610 and dspic33f j64gs608/610 devices table 4-48: portd register map for dspic33fj3 2gs406/606 and dspic33f j64gs406/606 devices table 4-49: porte register ma p for dspic33fj32gs608/610 and dspic33fj64gs608/610 devices table 4-50: porte register ma p for dspic33fj32gs406/606 and dspic33fj64gs406/606 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisd 02d8 trisd15 trisd14 trisd13 trisd12 trisd11 trisd10 trisd 9 trisd8 trisd7 trisd6 trisd5 tri sd4 trisd3 trisd2 trisd1 trisd0 ffff portd 02da rd15 rd14 rd13 rd12 rd11 rd10 rd9 rd8 rd7 rd6 rd5 rd4 rd3 rd2 rd1 rd0 xxxx latd 02dc latd15 latd14 latd13 latd12 latd11 latd10 latd9 latd8 latd7 latd6 latd5 latd4 latd3 latd2 latd1 latd0 0000 odcd 02de odcd15 odcd14 odcd13 odcd12 odcd11 odcd10 odcd9 odcd8 odcd7 odcd6 odcd5 o dcd4 odcd3 odcd2 odcd1 odcd0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisd 02d8 ? ? ? ? trisd11 trisd10 trisd9 trisd8 trisd7 trisd 6 trisd5 trisd4 trisd3 trisd2 trisd1 trisd0 0fff portd 02da ? ? ? ? rd11 rd10 rd9 rd8 rd7 rd6 rd5 rd4 rd3 rd2 rd1 rd0 xxxx latd 02dc ? ? ? ? latd11 latd10 latd9 latd8 latd7 latd6 latd5 latd4 latd3 latd2 latd1 latd0 0000 odcd 02de ? ? ? ? odcd11 odcd10 odcd9 odcd8 odcd7 odcd6 odcd5 odcd4 odcd3 odcd2 odcd1 odcd0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trise 02e0 ? ? ? ? ? ? trise9 trise8 trise7 trise6 trise5 trise4 trise3 trise2 trise1 trise0 03ff porte 02e2 ? ? ? ? ? ? re9 re8 re7 re6 re5 re4 re3 re2 re1 re0 xxxx late 02e4 ? ? ? ? ? ? late9 late8 late7 late6 late5 late4 late3 late2 late1 late0 0000 odce 02e6 ? ? ? ? ? ? ? ? odce7 odce6 odce5 odce4 odce3 odce2 odce1 odce0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trise 02e0 ? ? ? ? ? ? ? ? trise7 trise6 trise5 trise4 trise3 trise2 trise1 trise0 00ff porte 02e2 ? ? ? ? ? ? ? ? re7 re6 re5 re4 re3 re2 re1 re0 xxxx late 02e4 ? ? ? ? ? ? ? ? late7 late6 late5 late4 late3 late2 late1 late0 0000 odce 02e6 ? ? ? ? ? ? ? ? odce7 odce6 odce5 odce4 odce3 odce2 odce1 odce0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 94 ? 2009-2012 microchip technology inc. table 4-51: portf register map for dspic33fj32gs610 and dspic33fj64gs610 devices table 4-52: portf register map for dspic33fj32gs608 and dspic33fj64gs608 devices table 4-53: portf register ma p for dspic33fj32gs406/606 and dspic33fj64gs406/606 devices table 4-54: portg register map for dspic3 3fj32gs610 and dspic3 3fj64gs610 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisf 02e8 ? ? trisf13 trisf12 ? ? ? trisf8 trisf7 trisf6 trisf5 tri sf4 trisf3 trisf2 trisf1 trisf0 30ff portf 02ea ? ? rf13 rf12 ? ? ? rf8 rf7 rf6 rf5 rf4 rf3 rf2 rf1 rf0 xxxx latf 02ec ? ? latf13 latf12 ? ? ? latf8 latf7 latf6 latf5 latf4 latf3 latf2 latf1 latf0 0000 odcf 02ee ? ? odcf13 odcf12 ? ? ? odcf8 odcf7 odcf6 ? ? odcf3 odcf2 odcf1 ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisf 02e8 ? ? ? ? ? ? ? trisf8 trisf7 trisf6 trisf5 tri sf4 trisf3 trisf2 trisf1 trisf0 01ff portf 02ea ? ? ? ? ? ? ? rf8 rf7 rf6 rf5 rf4 rf3 rf2 rf1 rf0 xxxx latf 02ec ? ? ? ? ? ? ? latf8 latf7 latf6 latf5 latf4 latf3 latf2 latf1 latf0 0000 odcf 02ee ? ? ? ? ? ? ? odcf8 odcf7 odcf6 ? ? odcf3 odcf2 odcf1 ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisf 02e8 ? ? ? ? ? ? ? ? ? trisf6 trisf5 trisf4 trisf3 trisf2 trisf1 trisf0 007f portf 02ea ? ? ? ? ? ? ? ? ? rf6 rf5 rf4 rf3 rf2 rf1 rf0 xxxx latf 02ec ? ? ? ? ? ? ? ? ? latf6 latf5 latf4 latf3 latf2 latf1 latf0 0000 odcf 02ee ? ? ? ? ? ? ? ? ? odcf6 ? ? odcf3 odcf2 odcf1 ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisg 02f0 trisg15 trisg14 trisg13 trisg12 ? ? trisg9 trisg8 trisg7 trisg6 ? ? trisg3 trisg2 trisg1 trisg0 f3cf portg02f2rg15rg14rg13rg12 ? ? rg9 rg8 rg7 rg6 ? ? rg3 rg2 rg1 rg0 xxxx latg 02f4 latg15 latg14 latg13 latg12 ? ? latg9 latg8 latg7 latg6 ? ? latg3 latg2 latg1 latg0 0000 odcg 02f6 odcg15 odcg14 odcg13 odcg12 ? ? odcg9 odcg8 odcg7 odcg6 ? ? odcg3 odcg2 odcg1 odcg0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 95 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-55: portg register map for dspic3 3fj32gs608 and dspic3 3fj64gs608 devices table 4-56: portg register ma p for dspic33fj32gs406/606 and dspic33fj64gs406/606 devices table 4-57: system control register map file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisg 02f0 ? ? ? ? ? ? trisg9 trisg8 trisg7 trisg6 ? ? trisg3 trisg2 trisg1 trisg0 03cf portg 02f2 ? ? ? ? ? ? rg9 rg8 rg7 rg6 ? ? rg3 rg2 rg1 rg0 xxxx latg 02f4 ? ? ? ? ? ? latg9 latg8 latg7 latg6 ? ? latg3 latg2 latg1 latg0 0000 odcg 02f6 ? ? ? ? ? ? odcg9 odcg8 odcg7 odcg6 ? ? odcg3 odcg2 odcg1 odcg0 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisg 02f0 ? ? ? ? ? ? trisg9 trisg8 trisg7 trisg6 ? ? trisg3 trisg2 ? ? 03cc portg 02f2 ? ? ? ? ? ? rg9 rg8 rg7 rg6 ? ?rg3rg2 ? ? xxxx latg 02f4 ? ? ? ? ? ? latg9 latg8 latg7 latg6 ? ?latg3latg2 ? ? 0000 odcg 02f6 ? ? ? ? ? ? odcg9 odcg8 odcg7 odcg6 ? ? odcg3 odcg2 ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rcon 0740 trapr iopuwr ? ? ? ? ? vregs extr swr swdten wdto sleep idle bor por xxxx ( 1 ) osccon 0742 ? cosc<2:0> ? nosc<2:0> clklock ?lock ?cf ? ?oswen 0300 ( 2 ) clkdiv 0744 roi doze<2:0> doz en frcdiv<2:0> pllpost<1:0> ? pllpre<4:0> 0040 pllfbd 0746 ? ? ? ? ? ? ? plldiv<8:0> 0030 osctun 0748 ? ? ? ? ? ? ? ? ? ? tun<5:0> 0000 refocon 074e roon ? rosslp rosel rodiv<3:0> ? ? ? ? ? ? ? ? 0000 aclkcon 0750 enapll apllck selaclk ? ? apstsclr<2:0> asrcsel frcsel ? ? ? ? ? ? 2300 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. note 1: the rcon register reset values are dependent on the type of reset. 2: the osccon register reset values are dependent on the foscx configuration bits and on the type of reset.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 96 ? 2009-2012 microchip technology inc. table 4-58: nvm register map table 4-59: pmd register map for dspic33fj64gs610 devices table 4-60: pmd register map for dspic33fj32gs610 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 b it 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets nvmcon 0760 wr wren wrerr ? ? ? ? ? ?erase ? ?nvmop<3:0> 0000 ( 1 ) nvmkey 0766 ? ? ? ? ? ? ? ? nvmkey<7:0> 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. note 1: reset value shown is for por only. value on other reset states is dependent on the state of memory write or erase operations at the time of reset. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0770 t5md t4md t3md t2md t1md qei1md pwmmd ? i2c1md u2md u1md spi2md spi1md ?c1mdadcmd 0000 pmd2 0772 ? ? ? ? ic4md ic3md ic2md ic1md ? ? ? ? oc4md oc3md oc2md oc1md 0000 pmd3 0774 ? ? ? ? ? cmpmd ? ? ? ?qei2md ? ? ?i2c2md ? 0000 pmd4 0776 ? ? ? ? ? ? ? ? ? ? ? ?refomd ? ? ? 0000 pmd6 077a pwm8md pwm7md pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md ? ? ? ? ? ? ? ? 0000 pmd7 077c ? ? ? ? cmp4md cmp3md cmp2md cmp1md ? ? ? ? ? ? ?pwm9md 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0770 t5md t4md t3md t2md t1md qei1md pwmmd ? i2c1md u2md u1md spi2md spi1md ? ? adcmd 0000 pmd2 0772 ? ? ? ? ic4md ic3md ic2md ic1md ? ? ? ? oc4md oc3md oc2md oc1md 0000 pmd3 0774 ? ? ? ? ? cmpmd ? ? ? ?qei2md ? ? ?i2c2md ? 0000 pmd4 0776 ? ? ? ? ? ? ? ? ? ? ? ?refomd ? ? ? 0000 pmd6 077a pwm8md pwm7md pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md ? ? ? ? ? ? ? ? 0000 pmd7 077c ? ? ? ? cmp4md cmp3md cmp2md cmp1md ? ? ? ? ? ? ?pwm9md 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 97 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 4-61: pmd register map for dspic33fj64gs608 devices table 4-62: pmd register map for dspic33fj32gs608 devices table 4-63: pmd register map for DSPIC33FJ64GS606 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bi t 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0770 t5md t4md t3md t2md t1md qei1md pwmmd ? i2c1md u2md u1md spi2md spi1md ? c1md adcmd 0000 pmd2 0772 ? ? ? ? ic4md ic3md ic2md ic1md ? ? ? ? oc4md oc3md oc2md oc1md 0000 pmd3 0774 ? ? ? ? ? cmpmd ? ? ? ?qei2md ? ? ? i2c2md ? 0000 pmd4 0776 ? ? ? ? ? ? ? ? ? ? ? ?refomd ? ? ? 0000 pmd6 077a pwm8md pwm7md pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md ? ? ? ? ? ? ? ? 0000 pmd7 077c ? ? ? ? cmp4md cmp3md cmp2md cmp1md ? ? ? ? ? ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0770 t5md t4md t3md t2md t1md qei1md pwmmd ? i2c1md u2md u1md spi2md spi1md ? ? adcmd 0000 pmd2 0772 ? ? ? ? ic4md ic3md ic2md ic1md ? ? ? ? oc4md oc3md oc2md oc1md 0000 pmd3 0774 ? ? ? ? ? cmpmd ? ? ? ?qei2md ? ? ? i2c2md ? 0000 pmd4 0776 ? ? ? ? ? ? ? ? ? ? ? ?refomd ? ? ? 0000 pmd6 077a pwm8md pwm7md pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md ? ? ? ? ? ? ? ? 0000 pmd7 077c ? ? ? ? cmp4md cmp3md cmp2md cmp1md ? ? ? ? ? ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0770 t5md t4md t3md t2md t1md qei1md pwmmd ? i2c1md u2md u1md spi2md spi1md ? c1md adcmd 0000 pmd2 0772 ? ? ? ? ic4md ic3md ic2md ic1md ? ? ? ? oc4md oc3md oc2md oc1md 0000 pmd3 0774 ? ? ? ? ?cmpmd ? ? ? ?qei2md ? ? ? i2c2md ? 0000 pmd4 0776 ? ? ? ? ? ? ? ? ? ? ? ?refomd ? ? ? 0000 pmd6 077a ? ? pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md ? ? ? ? ? ? ? ? 0000 pmd7 077c ? ? ? ? cmp4md cmp3md cmp2md cmp1md ? ? ? ? ? ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 98 ? 2009-2012 microchip technology inc. table 4-64: pmd register map for dspic33fj32gs606 devices table 4-65: pmd register map for dspic33f j32gs406 and dspic33fj64gs406 devices file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0770 t5md t4md t3md t2md t1md qei1md pwmmd ? i2c1md u2md u1md spi2md spi1md ? ? adcmd 0000 pmd2 0772 ? ? ? ? ic4md ic3md ic2md ic1md ? ? ? ? oc4md oc3md oc2md oc1md 0000 pmd3 0774 ? ? ? ? ? cmpmd ? ? ? ?qei2md ? ? ? i2c2md ? 0000 pmd4 0776 ? ? ? ? ? ? ? ? ? ? ? ?refomd ? ? ? 0000 pmd6 077a ? ? pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md ? ? ? ? ? ? ? ? 0000 pmd7 077c ? ? ? ? cmp4md cmp3md cmp2md cmp1md ? ? ? ? ? ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal. file name sfr addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0770 t5md t4md t3md t2md t1md qei1md pwmmd ? i2c1md u2md u1md spi2md spi1md ? ? adcmd 0000 pmd2 0772 ? ? ? ? ic4md ic3md ic2md ic1md ? ? ? ? oc4md oc3md oc2md oc1md 0000 pmd3 0774 ? ? ? ? ? ? ? ? ? ?qei2md ? ? ? i2c2md ? 0000 pmd4 0776 ? ? ? ? ? ? ? ? ? ? ? ?refomd ? ? ? 0000 pmd6 077a ? ? pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md ? ? ? ? ? ? ? ? 0000 legend: x = unknown value on reset, ? = unimplemented, read as ? 0 ?. reset values are shown in hexadecimal.
? 2009-2012 microchip technology inc. ds70591e-page 99 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 4.2.7 software stack in addition to its use as a working register, the w15 register in the dspic3 3fj32gs406/606/608/610 and dspic33fj64gs406/606/608/6 10 devices is also used as a software stack pointer. the stack pointer always points to the first available free word and grows from lower to higher addresses. it predecrements for stack pops and post-increments for stack pushes, as shown in figure 4-6 . for a pc push during any call instruc- tion, the msb of the pc is zero-extended before the push, ensuring that the msb is always clear. the stack pointer limit r egister (splim) associated with the stack pointer sets an upper address boundary for the stack. splim is uninitialized at reset. as is the case for the stack pointer, splim<0> is forced to ? 0 ? because all stack operations must be word-aligned. whenever an ea is generated using w15 as a source or destination pointer, the resulting address is compared with the value in splim. if the contents of the stack pointer (w15) and the splim register are equal and a push operation is performed, a stack error trap will not occur. the stack error trap will occur on a subsequent push operation. fo r example, to cause a stack error trap when the stack grows beyond address 0x1800 in ram, initialize the splim with the value, 0x17fe. similarly, a stack pointer underflow (stack error) trap is generated when the stack pointer address is found to be less than 0x0800. this prevents the stack from interfering with the special function register (sfr) space. a write to the splim register should not be immediately followed by an indirect read operation using w15. figure 4-6: call stack frame 4.3 instruction addressing modes the addressing modes shown in table 4-66 form the basis of the addressing modes optimized to support the specific features of i ndividual instructions. the addressing modes provided in the mac class of instructions differ from th ose in the other instruction types. 4.3.1 file register instructions most file register instructions use a 13-bit address field (f) to directly address data present in the first 8192 bytes of data memory (near data space). most file register instructions employ a working register, w0, which is denoted as wreg in these instructions. the destination is typically either the same file register or wreg (with the exception of the mul instruction), which writes the result to a register or register pair. the mov instruction allows additional flexibility and can access the entire data space. 4.3.2 mcu instructions the three-operand mcu instru ctions are of the form: operand 3 = operand 1 operand 2 where operand 1 is always a working register (that is, the addressing mode can only be register direct), which is referred to as wb. operand 2 can be a w register, fetched from data memory, or a 5-bit literal. the result location can be either a w register or a data memory location. the following addressing modes are supported by mcu instructions: ? register direct ? register indirect ? register indirect post-modified ? register indirect pre-modified ? 5-bit or 10-bit literal note: a pc push during exception processing concatenates the srl register to the msb of the pc prior to the push. pc<15:0> 000000000 0 15 w15 (before call ) w15 (after call ) stack grows toward higher address 0x0000 pc<22:16> pop : [--w15] push : [w15++] note: not all instructions support all the addressing modes given above. individual instructions can support different subsets of these addressing modes.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 100 ? 2009-2012 microchip technology inc. table 4-66: fundamental addressing modes supported 4.3.3 move and accumulator instructions move instructions and the dsp accumulator class of instructions provide a great er degree of addressing flexibility than other instructions. in addition to the addressing modes supported by most mcu instructions, move and accu mulator instructions also support register indire ct with register offset addressing mode, also referred to as register indexed mode. in summary, the following addressing modes are supported by move and accumulator instructions: ? register direct ? register indirect ? register indirect post-modified ? register indirect pre-modified ? register indirect with register offset (indexed) ? register indirect with literal offset ? 8-bit literal ? 16-bit literal 4.3.4 mac instructions the dual source operand dsp instructions ( clr , ed , edac , mac , mpy , mpy.n , movsac and msc ), also referred to as mac instructions, use a simplified set of addressing modes to allow the user application to effectively manipulate the data pointers through register indirect tables. the two-source operand, pr efetch registers must be members of the set: {w8, w9, w10, w11}. for data reads, w8 and w9 are always directed to the x ragu, and w10 and w11 are always directed to the y agu. the effective addresses generated (before and after modification) must, therefore, be valid addresses within x data space for w8 and w9 and y data space for w10 and w11. in summary, the following addressing modes are supported by the mac class of instructions: ? register indirect ? register indirect post-modified by 2 ? register indirect post-modified by 4 ? register indirect post-modified by 6 ? register indirect with register offset (indexed) 4.3.5 other instructions besides the addressing modes outlined previously, some instructions use literal cons tants of various sizes. for example, bra (branch) instructions use 16-bit signed literals to specify the branch destination directly, whereas the disi instruction uses a 14-bit unsigned literal field. in some instructions, such as add acc , the source of an operand or result is implied by the opcode itself. certain operations, such as nop , do not have any operands. addressing mode description file register direct the address of the file register is specified explicitly. register direct the contents of a register are accessed directly. register indirect the contents of wn forms the effective address (ea). register indirect post-modified the contents of wn forms the ea. wn is post-modified (incremented or decremented) by a constant value. register indirect pre-modified wn is pre-modified (inc remented or decremented) by a signed constant value to form the ea. register indirect with register offset (register indexed) the sum of wn and wb forms the ea. register indirect with literal offset the sum of wn and a literal forms the ea. note: for the mov instructions, the addressing mode specified in the instruction can differ for the source and destination ea. however, the 4-bit wb (register offset) field is shared by both source and destination (but typically only used by one). note: not all instructions support all the addressing modes given above. individual instructions may support different subsets of these addressing modes. note: register indirect with register offset addressing mode is available only for w9 (in x space) and w11 (in y space).
? 2009-2012 microchip technology inc. ds70591e-page 101 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 4.4 modulo addressing modulo addressing mode is a method used to provide an automated means to support circular data buffers using hardware. the objective is to remove the need for software to perform data address boundary checks when executing tightly looped code, as is typical in many dsp algorithms. modulo addressing can operate in either data or program space (since the data pointer mechanism is essentially the same for both). one circular buffer can be supported in each of the x (which also provides the pointers into program space) and y data spaces. modulo addressing can operate on any w register pointer. however, it is not advisable to use w14 or w15 for modulo addressing since these two registers ar e used as the stack frame pointer and stack pointer, respectively. in general, any particular circular buffer can be configured to operate in only one direction as there are certain restrictions on the bu ffer start address (for incre- menting buffers), or end address (for decrementing buffers), based upon the direction of the buffer. the only exception to the usage restrictions is for buffers that have a power-of-two length. as these buffers satisfy the start and end address criteria, they can operate in a bidirectional mode (that is, address boundary checks are performe d on both the lower and upper address boundaries). 4.4.1 start and end address the modulo addressing scheme requires that a starting and ending address be specified and loaded into the 16-bit modulo buffer address registers: xmodsrt, xmodend, ymodsrt and ymodend (see ta b l e 4 - 1 ). the length of a circular buffer is not directly specified. it is determined by the difference between the corresponding start and end addresses. the maximum possible length of the circular buffer is 32k words (64 kbytes). 4.4.2 w address register selection the modulo and bit-reversed addressing control register, modcon<15:0>, contains enable flags as well as a w register fiel d to specify the w address registers. the xwm and ywm fields select the registers that will operat e with modulo addressing: ? if xwm = 15, x ragu and x wagu modulo addressing is disabled. ? if ywm = 15, y agu modulo addressing is disabled. the x address space pointer w register (xwm), to which modulo addressing is to be applied, is stored in modcon<3:0> (see table 4-1 ). modulo addressing is enabled for x data space when xwm is set to any value other than ?15? and the xmoden bit is set at modcon<15>. the y address space pointer w register (ywm) to which modulo addressing is to be applied is stored in modcon<7:4>. modulo addressing is enabled for y data space when ywm is set to any value other than ?15? and the ymoden bit is set at modcon<14>. figure 4-7: modulo addr essing operation example note: y space modulo addressing ea calculations assume word-sized data (lsb of every ea is always clear). 0x1100 0x1163 start addr = 0x1100 end addr = 0x1163 length = 0x0032 words byte address mov #0x1100, w0 mov w0, xmodsrt ;set modulo start address mov #0x1163, w0 mov w0, modend ;set modulo end address mov #0x8001, w0 mov w0, modcon ;enable w1, x agu for modulo mov #0x0000, w0 ;w0 holds buffer fill value mov #0x1110, w1 ;point w1 to buffer do again, #0x31 ;fill the 50 buffer locations mov w0, [w1++] ;fill the next location again: inc w0, w0 ;increment the fill value
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 102 ? 2009-2012 microchip technology inc. 4.4.3 modulo addressing applicability modulo addressing can be applied to the effective address (ea) calculation associated with any w register. address boundaries check for addresses equal to: ? upper boundary addresses for incrementing buffers ? lower boundary addresses for decrementing buffers it is important to realize that the address boundaries check for addresses less than or greater than the upper (for incrementing buffers) and lower (for decrementing buffers) boundary addresses (not just equal to). address changes can, therefore, jump beyond boundaries and still be adjusted correctly. 4.5 bit-reversed addressing bit-reversed addressing mode is intended to simplify data re-ordering for radix-2 fft algorithms. it is supported by the x agu for data writes only. the modifier, which can be a constant value or register contents, is regarded as havi ng its bit order reversed. the address source and destination are kept in normal order. thus, the only operand requiring reversal is the modifier. 4.5.1 bit-reversed addressing implementation bit-reversed addressing mode is enabled in any of these situations: ? bwmx bits (w register selection) in the modcon register are any value other than ?15? (the stack cannot be accessed using bit-reversed addressing) ? the bren bit is set in the xbrev register ? the addressing mode used is register indirect with pre-increment or post-increment if the length of a bit-reversed buffer is m = 2 n bytes, the last ?n? bits of the data buffer start address must be zeros. xb<14:0> is the bit-reversed addressing modifier, or ?pivot point,? which is typica lly a constant. in the case of an fft computation, its value is equal to half of the fft data buffer size. when enabled, bit-reversed addressing is executed only for register indire ct with pre-increment or post-increment addressing and word-sized data writes. it will not function for any other addressing mode or for byte-sized data, and normal addresses are generated instead. when bit-reversed addressing is active, the w address pointer is always added to the address modifier (xb), and the offset associated with the register indirect addressing mode is ignored. in addition, as word-sized data is a requirement, the lsb of the ea is ignored (and always clear). if bit-reversed addressing has already been enabled by setting the bren (xbrev<15>) bit, a write to the xbrev register should not be immediately followed by an indirect read operation using the w register that has been designated as the bit-reversed pointer. note: the modulo corrected effective address is written back to the register only when pre-modify or post-modify addressing mode is used to compute the effective address. when an address offset (such as [w7 + w2]) is used, modulo addressing correction is performed but the contents of the register remain unchanged. note: all bit-reversed ea calculations assume word-sized data (lsb of every ea is always clear). the xb value is scaled accordingly to generate compatible (byte) addresses. note: modulo addressing and bit-reversed addressing should not be enabled together. if an application attempts to do so, bit-reversed addressing will assume priority when active for the x wagu and x wagu, and modulo addressing will be disabled. however, modulo addressing will continue to function in the x ragu.
? 2009-2012 microchip technology inc. ds70591e-page 103 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 4-8: bit-reversed address example table 4-67: bit-reversed address sequence (16-entry) normal address bit-reversed address a3 a2 a1 a0 decimal a3 a2 a1 a0 decimal 0000 0 0000 0 0001 1 1000 8 0010 2 0100 4 0011 3 1100 12 0100 4 0010 2 0101 5 1010 10 0110 6 0110 6 0111 7 1110 14 1000 8 0001 1 1001 9 1001 9 1010 10 0101 5 1011 11 1101 13 1100 12 0011 3 1101 13 1011 11 1110 14 0111 7 1111 15 1111 15 b3 b2 b1 0 b2 b3 b4 0 bit locations swapped left-to-right around center of binary value bit-reversed address xb = 0x0008 for a 16-word bit-reversed buffer b7 b6 b5 b1 b7 b6 b5 b4 b11 b10 b9 b8 b11 b10 b9 b8 b15 b14 b13 b12 b15 b14 b13 b12 sequential address pivot point
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 104 ? 2009-2012 microchip technology inc. 4.6 interfacing program and data memory spaces the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 architecture uses a 24-bit-wide program space and a 16-bit-wide data space. the architecture is also a modified harvard scheme, meaning that data ca n also be present in the program space. to use this data successfully, it must be accessed in a way that preserves the alignment of information in both spaces. aside from normal executio n, the dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 architecture provides two methods by which program space can be accessed during operation: ? using table instructions to access individual bytes or words anywhere in the program space ? remapping a portion of the program space into the data space (program space visibility) table instructions allow an application to read or write to small areas of the program memory. this capability makes the method ideal for accessing data tables that need to be updated periodically. it also allows access to all bytes of the program word. the remapping method allows an application to access a large block of data on a read-only basis, which is ideal for look-ups from a large table of static data. the application can only access the least significant word of the program word. 4.6.1 addressing program space since the address ranges for the data and program spaces are 16 and 24 bits, respectively, a method is needed to create a 23-bit or 24-bit program address from 16-bit data registers. the solution depends on the interface method to be used. for table operations, the 8-bit table page register (tblpag) is used to define a 32k word region within the program space. this is concatenated with a 16-bit ea to arrive at a full 24-bit program space address. in this format, the most significant bit of tblpag is used to determine if the operation occurs in the user memory (tblpag<7> = 0 ) or the configuration memory (tblpag<7> = 1 ). for remapping operations, the 8-bit program space visibility register (psvp ag) is used to define a 16k word page in the program space. when the most significant bit of the ea is ? 1 ?, psvpag is concatenated with the lower 15 bits of the ea to form a 23-bit program space address. unlike table operations, this limits remapping operations strictly to the user memory area. table 4-68 and figure 4-9 show how the program ea is created for table operations and remapping accesses from the data ea. here, p<23:0> refers to a program space word and d<15:0> refers to a data space word. table 4-68: program sp ace address construction access type access space program space address <23> <22:16> <15> <14:1> <0> instruction access (code execution) user 0 pc<22:1> 0 0xx xxxx xxxx xxxx xxxx xxx0 tblrd/tblwt (byte/word read/write) user tblpag<7:0> data ea<15:0> 0xxx xxxx xxxx xxxx xxxx xxxx configuration tblpag<7:0> data ea<15:0> 1xxx xxxx xxxx xxxx xxxx xxxx program space visibility (block remap/read) user 0 psvpag<7:0> data ea<14:0> ( 1 ) 0 xxxx xxxx xxx xxxx xxxx xxxx note 1: data ea<15> is always ? 1 ? in this case, but is not used in calculating the program space address. bit 15 of the address is psvpag<0>.
? 2009-2012 microchip technology inc. ds70591e-page 105 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 4-9: data access from pr ogram space addr ess generation 0 program counter 23 bits 1 psvpag 8 bits ea 15 bits program counter (1) select tblpag 8 bits ea 16 bits byte select 0 0 1/0 user/configuration table operations (2) program space visibility (1) space select 24 bits 23 bits (remapping) 1/0 0 note 1: the least significant bit (lsb) of program space addresses is always fixed as ? 0 ? to maintain word alignment of data in the program and data spaces. 2: table operations are not required to be word-a ligned. table read operations are permitted in the configuration memory space.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 106 ? 2009-2012 microchip technology inc. 4.6.2 data access from program memory using table instructions the tblrdl and tblwtl instructions offer a direct method of reading or writing the lower word of any address within the program space without going through data space. the tblrdh and tblwth instructions are the only me thod to read or write the upper 8 bits of a program space word as data. the pc is incremented by two for each successive 24-bit program word. this allows program memory addresses to directly map to data space addresses. program memory can thus be regarded as two 16-bit-wide word address spaces, residing side by side, each with the same address range. tblrdl and tblwtl access the space that contains the least significant data word. tblrdh and tblwth access the space that contains the upper data byte. two table instructions are provided to move byte or word-sized (16-bit) data to and from program space. both function as either byte or word operations. ? tblrdl (table read low): - in word mode, this instruction maps the lower word of the program space location (p<15:0>) to a data address (d<15:0>). - in byte mode, either the upper or lower byte of the lower program word is mapped to the lower byte of a data address. the upper byte is selected when byte select is ? 1 ?; the lower byte is selected when it is ? 0 ?. ? tblrdh ( table read high): - in word mode, this instruction maps the entire upper word of a program address (p<23:16>) to a data address. note that d<15:8>, the ?phantom byte?, will always be ? 0 ?. - in byte mode, this inst ruction maps the upper or lower byte of the program word to d<7:0> of the data address, in the tblrdl instruction. the data is always ? 0 ? when the upper ?phantom? byte is selected (byte select = 1 ). similarly, two table instructions, tblwth and tblwtl , are used to write individual bytes or words to a program space address. the details of their operation are explained in section 5.0 ?flash program memory? . for all table operations, the area of program memory space to be accessed is determined by the table page register (tblpag). tblpag covers the entire program memory space of the device, including user and configuration spaces. when tblpag<7> = 0 , the table page is located in the user memory space. when tblpag<7> = 1 , the page is located in configuration space. figure 4-10: accessing program memory with table instructions 0 8 16 23 00000000 00000000 00000000 00000000 ?phantom? byte tblrdh.b (wn<0> = 0 ) tblrdl.w tblrdl.b (wn<0> = 1 ) tblrdl.b (wn<0> = 0 ) 23 15 0 tblpag 02 0x000000 0x800000 0x020000 0x030000 program space the address for the table operation is determined by the data ea within the page defined by the tblpag register. only read operations are shown; write operations are also valid in the user memory area.
? 2009-2012 microchip technology inc. ds70591e-page 107 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 4.6.3 reading data from program memory using program space visibility the upper 32 kbytes of data space may optionally be mapped into any 16k word page of the program space. this option provides transparent access to stored constant data from the data space without the need to use special instructions (such as tblrdl/h ). program space access through the data space occurs if the most significant bit of the data space ea is ? 1 ? and program space visibility is enabled by setting the psv bit in the core control register (corcon<2>). the location of the program memory space to be mapped into the data space is determined by the program space visibility page register (psvpag). this 8-bit register defines any one of 256 possible pages of 16k words in program space. in effect, psvpag functions as the upper 8 bits of the program memory address, with the 15 bits of the ea functioning as the lower bits. by incrementing the pc by 2 for each program memory word, the lower 15 bits of data space addresses directly map to the lower 15 bits in the corresponding program space addresses. data reads to this area ad d a cycle to the instruction being executed, since two program memory fetches are required. although each data space address 8000h and higher maps directly into a corresponding program memory address (see figure 4-11 ), only the lower 16 bits of the 24-bit program word are us ed to contain the data. the upper 8 bits of any program space location used as data should be programmed with ? 1111 1111 ? or ? 0000 0000 ? to force a nop . this prevents possible issues should the area of code ever be accidentally executed. for operations that use psv and are executed outside a repeat loop, the mov and mov.d instructions require one instruction cycle in ad dition to the specified execution time. all other instructions require two instruction cycles in addition to the specified execution time. for operations that use psv and are executed inside a repeat loop, these instances require two instruction cycles in addition to the spec ified execution time of the instruction: ? execution in th e first iteration ? execution in the last iteration ? execution prior to exiting the loop due to an interrupt ? execution upon re-entering the loop after an interrupt is serviced any other iteration of the repeat loop will allow the instruction using psv to access data, to execute in a single cycle. figure 4-11: program space visibility operation note: psv access is temporar ily disabled during table reads/writes. 23 15 0 psvpag data space program space 0x0000 0x8000 0xffff 02 0x000000 0x800000 0x010000 0x018000 when corcon<2> = 1 and ea<15> = 1 : the data in the page designated by psvpag is mapped into the upper half of the data memory space... data ea<14:0> ...while the lower 15 bits of the ea specify an exact address within the psv area. this corresponds exactly to the same lower 15 bits of the actual program space address. psv area
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 108 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 109 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 5.0 flash program memory the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices contain internal flash program memory for storing and execut- ing application code. the memory is readable, writable and erasable during normal operation over the entire v dd range. flash memory can be programmed in two ways: ? in-circuit serial programming? (icsp?) ? run-time self-programming (rtsp) icsp allows a dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 device to be serially programmed while in the end application circuit. this is done with two lines for programming clock and programming data (one of the alternate programming pin pairs: pgec1/pged1, pgec2/pged2 or pgec3/ pged3), and three other lines for power (v dd ), ground (v ss ) and master clear (mclr ). this allows customers to manufacture boards with unprogrammed devices and then program the digital signal controller (dsc) just before shipping the prod uct. this also allows the most recent firmware or a custom firmware to be programmed. rtsp is accomplished using tblrd (table read) and tblwt (table write) instructions. with rtsp, the user application can write progra m memory data, either in blocks or ?rows? of 64 instruct ions (192 bytes) at a time, or a single program memory word, and erase program memory in blocks or ?pages? of 512 instructions (1536 bytes) at a time. 5.1 table instructions and flash programming regardless of the method used, all programming of flash memory is done with the table read and table write instructions. these allow direct read and write access to the program memory space from the data memory while the device is in normal operating mode. the 24-bit target address in the program memory is formed using bits<7:0> of the tblpag register and the effective address (ea) from a w register specified in the table instruction, as shown in figure 5-1 . the tblrdl and the tblwtl instructions are used to read or write to bits<15:0> of program memory. tblrdl and tblwtl can access program memory in both word and byte modes. the tblrdh and tblwth instructions are used to read or write to bits<23:16> of program memory. tblrdh and tblwth can also access program memory in word or byte mode. figure 5-1: addressing for table registers note 1: this data sheet summarizes the features of the dspic33fj32gs406/ 606/608/610 and dspic33fj64gs406/ 606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 5. ?flash programming? (ds70191) in the ? dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for device-specific register and bit information. 0 program counter 24 bits program counter tblpag reg 8 bits working reg ea 16 bits byte 24-bit ea 0 1/0 select using table instruction using user/configuration space select
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 110 ? 2009-2012 microchip technology inc. 5.2 rtsp operation the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 flash program memory array is organized into rows of 64 instructions or 192 bytes. rtsp allows the user application to erase a page of memory, which consists of eight rows (512 instructions) at a time, and to program one row or one word at a time. table 27-12 shows typical erase and programming times. the 8-row erase pages and single row write rows are edge-aligned from the beginning of program memory, on boundaries of 1536 bytes and 192 bytes, respectively. the program memory implements holding buffers that can contain 64 instructions of programming data. prior to the actual programming operation, the write data must be loaded into the buffers sequentially. the instruction words loaded must always be from a group of 64 boundary. the basic sequence for rtsp programming is to set up a table pointer, then do a series of tblwt instructions to load the buffers. programming is performed by setting the control bits in the nvmcon register. a total of 64 tblwtl and tblwth instructions are required to load the instructions. all of the table write operations are single-word writes (two instruction cycles) because only the buffers are writ- ten. a programming cycle is required for programming each row. 5.3 programming operations a complete programming sequence is necessary for programming or erasing the internal flash in rtsp mode. the processor stalls (waits) until the programming operation is finished. the programming time depends on the frc accuracy (see table 27-20 ) and the value of the frc oscillator tuning register (see register 9-4 ). use the following formula to calculate the minimum and maximum values for the row write time, page erase time and word write cycle time parameters (see table 27-12 ). equation 5-1: programming time for example, if the device is operating at +125c, the frc accuracy will be 2%. if the tun<5:0> bits (see register 9-4 ) are set to ?b000000 , the minimum row write time is equal to equation 5-2 . equation 5-2: minimum row write time the maximum row write time is equal to equation 5-3 . equation 5-3: maximum row write time setting the wr bit (nvmcon<15>) starts the operation, and the wr bit is automatically cleared when the operation is finished. 5.4 control registers two sfrs are used to read and write the program flash memory: nvmcon and nvmkey. the nvmcon register ( register 5-1 ) controls which blocks are to be erased, which memory type is to be programmed and the start of the programming cycle. nvmkey is a write-only regist er that is used for write protection. to start a pr ogramming or erase sequence, the user application must c onsecutively write 0x55 and 0xaa to the nvmkey register. refer to section 5.3 ?programming operations? for further details. t 7.37 mhz frc accuracy ?? % frc tuning ?? % ? ? ------------------------------------------------------------------------------------------------------------------------- - t rw = = 1.477 ms 11064 cycles 7.37 mhz ? (1 + 0.02) ? (1 ? 0.00375) t rw = = 1.537 ms 11064 cycles 7.37 mhz ? (1 ? 0.02) ? (1 ? 0.00375)
? 2009-2012 microchip technology inc. ds70591e-page 111 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 5-1: nvmcon: flash memory control register r/so-0 ( 1 ) r/w-0 ( 1 ) r/w-0 ( 1 ) u-0 u-0 u-0 u-0 u-0 wr wren wrerr ? ? ? ? ? bit 15 bit 8 u-0 r/w-0 ( 1 ) u-0 u-0 r/w-0 ( 1 ) r/w-0 ( 1 ) r/w-0 ( 1 ) r/w-0 ( 1 ) ? erase ? ?nvmop<3:0> ( 2 ) bit 7 bit 0 legend: so = settable only bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 wr: write control bit ( 1 ) 1 = initiates a flash memory program or erase opera tion; the operation is self-timed and the bit is cleared by hardware once operation is complete 0 = program or erase operation is complete and inactive bit 14 wren: write enable bit ( 1 ) 1 = enables flash program/erase operations 0 = inhibits flash program/erase operations bit 13 wrerr: write sequence error flag bit ( 1 ) 1 = an improper program or erase sequence attempt or termination has occurred (bit is set automatically on any set attempt of the wr bit) 0 = the program or erase operation completed normally bit 12-7 unimplemented: read as ? 0 ? bit 6 erase: erase/program enable bit ( 1 ) 1 = performs the erase operation specified by nvmop<3:0> on the next wr command 0 = performs the program operation specified by nvmop<3:0> on the next wr command bit 5-4 unimplemented: read as ? 0 ? bit 3-0 nvmop<3:0>: nvm operation select bits ( 1 , 2 ) if erase = 1 : 1111 = memory bulk erase operation 1101 = erases general segment 0011 = no operation 0010 = memory page erase operation 0001 = no operation 0000 = erases a single configuration register byte if erase = 0 : 1111 = no operation 1101 = no operation 0011 = memory word program operation 0010 = no operation 0001 = memory row program operation 0000 = programs a single configuration register byte note 1: these bits can only be reset on a power-on reset. 2: all other combinations of nv mop<3:0> are unimplemented.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 112 ? 2009-2012 microchip technology inc. register 5-2: nvmkey: nonvolatile memory key register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 w-0 w-0 w-0 w-0 w-0 w-0 w-0 w-0 nvmkey<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as ? 0 ? bit 7-0 nvmkey<7:0>: key register bits (write-only)
? 2009-2012 microchip technology inc. ds70591e-page 113 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 5.4.1 programming algorithm for flash program memory one row of program flash memory can be programmed at a time. to achieve this, it is necessary to erase the 8-row erase page that contains the desired row. the general process is: 1. read eight rows of program memory (512 instructions) and store in data ram. 2. update the program data in ram with the desired new data. 3. erase the block (see example 5-1 ): a) set the nvmopx bits (nvmcon<3:0>) to ? 0010 ? to configure for block erase. set the erase (nvmcon<6>) and wren (nvmcon<14>) bits. b) write the starting address of the page to be erased into the tblpag and w registers. c) write 0x55 to nvmkey. d) write 0xaa to nvmkey. e) set the wr bit (nvmcon<15>). the erase cycle begins and the cpu stalls for the duration of the erase cycle. when the erase is done, the wr bit is cleared automatically. 4. write the first 64 instructions from data ram into the program memory buffers (see example 5-2 ). 5. write the program block to flash memory: a) set the nvmopx bits to ? 0001 ? to configure for row programming. clear the erase bit and set the wren bit. b) write 0x55 to nvmkey. c) write 0xaa to nvmkey. d) set the wr bit. the programming cycle begins and the cpu stalls for the duration of the write cycle. when the write to flash memory is done, the wr bit is cleared automatically. 6. repeat steps 4 and 5, using the next available 64 instructions from the block in data ram by incrementing the value in tblpag, until all 512 instructions are written back to flash memory. for protection against accidental operations, the write initiate sequence for nvmkey must be used to allow any erase or program operation to proceed. after the programming command has been executed, the user application must wait for the programming time until programming is complete. the two instructions following the start of the programming sequence should be nop s, as shown in example 5-3 . example 5-1: erasing a program memory page ; set up nvmcon for block erase operation mov #0x4042, w0 ; mov w0, nvmcon ; initialize nvmcon ; init pointer to row to be erased mov #tblpage(prog_addr), w0 ; mov w0, tblpag ; initialize pm page boundary sfr mov #tbloffset(prog_addr), w0 ; initialize in-page ea[15:0] pointer tblwtl w0, [w0] ; set base address of erase block disi #5 ; block all interrupts with priority <7 ; for next 5 instructions mov #0x55, w0 mov w0, nvmkey ; write the 55 key mov #0xaa, w1 ; mov w1, nvmkey ; write the aa key bset nvmcon, #wr ; start the erase sequence nop ; insert two nops after the erase nop ; command is asserted
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 114 ? 2009-2012 microchip technology inc. example 5-2: loading the write buffers example 5-3: initiating a programming sequence ; set up nvmcon for row programming operations mov #0x4001, w0 ; mov w0, nvmcon ; initialize nvmcon ; set up a pointer to the first program memory location to be written ; program memory selected, and writes enabled mov #0x0000, w0 ; mov w0, tblpag ; initialize pm page boundary sfr mov #0x6000, w0 ; an example program memory address ; perform the tblwt instructions to write the latches ; 0th_program_word mov #low_word_0, w2 ; mov #high_byte_0, w3 ; tblwtl w2, [w0] ; write pm low word into program latch tblwth w3, [w0++] ; write pm high byte into program latch ; 1st_program_word mov #low_word_1, w2 ; mov #high_byte_1, w3 ; tblwtl w2, [w0] ; write pm low word into program latch tblwth w3, [w0++] ; write pm high byte into program latch ; 2nd_program_word mov #low_word_2, w2 ; mov #high_byte_2, w3 ; tblwtl w2, [w0] ; write pm low word into program latch tblwth w3, [w0++] ; write pm high byte into program latch ? ? ? ; 63rd_program_word mov #low_word_31, w2 ; mov #high_byte_31, w3 ; tblwtl w2, [w0] ; write pm low word into program latch tblwth w3, [w0++] ; write pm high byte into program latch disi #5 ; block all interrupts with priority <7 ; for next 5 instructions mov #0x55, w0 mov w0, nvmkey ; write the 55 key mov #0xaa, w1 ; mov w1, nvmkey ; write the aa key bset nvmcon, #wr ; start the erase sequence nop ; insert two nops after the nop ; erase command is asserted
? 2009-2012 microchip technology inc. ds70591e-page 115 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 6.0 resets the reset module combines all reset sources and controls the device mast er reset signal, sysrst . the following is a list of device reset sources: ? por: power-on reset ? bor: brown-out reset ?mclr : master clear pin reset ?swr: software reset instruction ? wdto: watchdog timer reset ? trapr: trap conflict reset ? iopuwr: illegal condition device reset - illegal opcode reset - uninitialized w register reset - security reset a simplified block diagram of the reset module is shown in figure 6-1 . any active source of reset will make the sysrst signal active. on system rese t, some of the registers associated with the cpu and peripherals are forced to a known reset state and some are unaffected. all types of device reset sets a corresponding status bit in the rcon register to indicate the type of reset (see register 6-1 ). a por clears all the bits, except for the por bit (rcon<0>), that are set. th e user application can set or clear any bit at any time during code execution. the rcon bits only serve as status bits. setting a particular reset status bit in software does not cause a device reset to occur. the rcon register also has other bits associated with the watchdog timer and device power-saving states. the function of these bits is discussed in other sections of this manual. figure 6-1: reset system block diagram note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 8. ?reset? (ds70192) in the ? dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. note: refer to the specific peripheral section or section 3.0 ?cpu? of this data sheet for register reset states. note: the status bits in the rcon register should be cleared after they are read so that the next rcon register value after a device reset is meaningful. mclr v dd internal regulator bor sleep or idle reset instruction wdt module glitch filter trap conflict illegal opcode uninitialized w register sysrst v dd rise detect por
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 116 ? 2009-2012 microchip technology inc. register 6-1: rcon: re set control register ( 1 ) r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 r/w-0 trapr iopuwr ? ? ? ? ?vregs bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-1 extr swr swdten ( 2 ) wdto sleep idle bor por bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 trapr: trap reset flag bit 1 = a trap conflict reset has occurred 0 = a trap conflict reset has not occurred bit 14 iopuwr: illegal opcode or uninitialized w access reset flag bit 1 = an illegal opcode detection, an illegal address mode or uninitialized w register used as an address pointer caused a reset 0 = an illegal opcode or uninitialized w reset has not occurred bit 13-9 unimplemented: read as ? 0 ? bit 8 vregs: voltage regulator standby during sleep bit 1 = voltage regulator is active during sleep 0 = voltage regulator goes into standby mode during sleep bit 7 extr: external reset pin (mclr ) bit 1 = a master clear (pin) reset has occurred 0 = a master clear (pin) reset has not occurred bit 6 swr: software reset flag (instruction) bit 1 = a reset instruction has been executed 0 = a reset instruction has not been executed bit 5 swdten: software enable/disable of wdt bit ( 2 ) 1 = wdt is enabled 0 = wdt is disabled bit 4 wdto: watchdog timer time-out flag bit 1 = wdt time-out has occurred 0 = wdt time-out has not occurred bit 3 sleep: wake-up from sleep flag bit 1 = device has been in sleep mode 0 = device has not been in sleep mode bit 2 idle: wake-up from idle flag bit 1 = device has b een in idle mode 0 = device has not been in idle mode bit 1 bor: brown-out reset flag bit 1 = a brown-out reset has occurred 0 = a brown-out reset has not occurred bit 0 por: power-on reset flag bit 1 = a power-on reset has occurred 0 = a power-on reset has not occurred note 1: all of the reset status bits can be set or cleared in software. setting one of these bits in software does not cause a device reset. 2: if the fwdten configuration bit is ? 1 ? (unprogrammed), the wdt is always enabled, regardless of the swdten bit setting.
? 2009-2012 microchip technology inc. ds70591e-page 117 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 6.1 system reset the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices have two type s of reset: ? cold reset ? warm reset a cold reset is the result of a power-on reset (por) or a brown-out reset (bor). on a cold reset, the fnoscx configuration bits in the fosc configuration register select the device clock source. a warm reset is the result of all the other reset sources, including the reset instruction. on warm reset, the device will continue to operate from the current clock source as indicated by the current oscillator selection (cosc<2:0>) bits in the oscillator control (osccon<14:12>) register. the device is kept in a reset state until the system power supplies have stabilized at appropriate levels and the oscillator clock is ready. the sequence in which this occurs is described in figure 6-2 . table 6-1: oscillator delay oscillator mode oscillator start-up delay oscillator start-up timer pll lock time total delay frc, frcdiv16, frcdivn t oscd ( 1 ) ??t oscd ( 1 ) frcpll t oscd ( 1 ) ?t lock ( 3 ) t oscd + t lock ( 1 , 3 ) xt t oscd ( 1 ) t ost ( 2 ) ?t oscd + t ost ( 1 , 2 ) hs t oscd ( 1 ) t ost ( 2 ) ?t oscd + t ost ( 1 , 2 ) ec ???? xtpll t oscd ( 1 ) t ost ( 2 ) t lock ( 3 ) t oscd + t ost + t lock ( 1 , 2 , 3 ) hspll t oscd ( 1 ) t ost ( 2 ) t lock ( 3 ) t oscd + t ost + t lock ( 1 , 2 , 3 ) ecpll ? ? t lock ( 3 ) t lock ( 3 ) lprc t oscd ( 1 ) ??t oscd ( 1 ) note 1: t oscd = oscillator start-up delay (1.1 ? s max. for frc, 70 ? s max. for lprc). crystal oscillator start-up times vary with crystal characteristics, load capacitance, etc. 2: t ost = oscillator start-up timer (ost) delay (1024 oscillator clock period). for example, t ost = 102.4 ? s for a 10 mhz crystal and t ost = 32 ms for a 32 khz crystal. 3: t lock = pll lock time (1.5 ms nominal) if pll is enabled.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 118 ? 2009-2012 microchip technology inc. figure 6-2: system reset timing reset run device status v dd v por v bor por bor sysrst t pwrt t por t bor oscillator clock t oscd t ost t lock time fscm t fscm 1 2 3 4 5 6 note 1: por: a por circuit holds the device in reset when the power supply is turned on. the po r circuit is active until v dd crosses the v por threshold and the delay, t por , has elapsed. 2: bor: the on-chip voltage regulator has a bor ci rcuit that keeps the device in reset until v dd crosses the v bor threshold and the delay, t bor , has elapsed. the delay, t bor , ensures the voltage regulator output becomes stable. 3: pwrt timer: the programmable power-up timer (pwrt) continue s to hold the processor in reset for a specific period of time (t pwrt ) after a bor. the delay, t pwrt , ensures that the system power supplies have stabilized at the appropriate level for full-speed operation. after the delay, t pwrt has elapsed and the sysrst becomes inactive, which in turn, enables the selected os cillator to start ge nerating clock cycles. 4: oscillator delay: the total delay for the clock to be ready for various clock source selections is given in table 6-1 . refer to section 9.0 ?oscillator configuration? for more information. 5: when the oscillator clock is ready, the processor begins execution from location, 0x 000000. the user application programs a goto instruction at the reset address, which redire cts program execution to the appropriate start-up routine. 6: if the fail-safe clock monitor (fscm) is enabled, it begins to monitor the system cloc k when the system clock is ready and the delay, t fscm , has elapsed. note: when the device exits the reset condition (begin s normal operation), the device operating parameters (voltage, frequency, temperature, etc.) must be with in their operating ranges; otherwise, the device may not function correctly. the user application must ens ure that the delay between the time power is first applied, and the time sysrst becomes inactive, is long enough to get all operating parameters within specification.
? 2009-2012 microchip technology inc. ds70591e-page 119 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 6.2 power-on reset (por) a power-on reset (por) circuit ensures the device is reset from power-on. the por circuit is active until v dd crosses the v por threshold and the delay, t por , has elapsed. the delay, t por , ensures the internal device bias circuits become stable. the device supply voltage characteristics must meet the specified starting voltage and rise rate requirements to generate the por. refer to section 27.0 ?electrical characteristics? for details. the power-on reset (por) status bit in the reset control (rcon<0>) register is set to indicate the power-on reset. 6.3 brown-out reset (bor) and power-up timer (pwrt) the on-chip regulator has a brown-out reset (bor) circuit that resets the device when the v dd is too low (v dd < v bor ) for proper device operation. the bor circuit keeps the device in reset until v dd crosses the v bor threshold and the delay, t bor , has elapsed. the delay, t bor , ensures the voltage regulator output becomes stable. the brown-out reset (bor) status bit in the reset control (rcon<1>) register is set to indicate the brown-out reset. the device will not run at full speed after a bor as the v dd should rise to acceptab le levels for full-speed operation. the pwrt provides power-up time delay (t pwrt ) to ensure that the system power supplies have stabilized at the appropriate levels for full-speed operation before the sysrst is released. the power-up timer delay (t pwrt ) is programmed by the power-on reset timer value select (fpwrt<2:0>) bits in the fpor configuration (fpor<2:0>) register, which provides eight settings (from 0 ms to 128 ms). refer to section 24.0 ?special features? for further details. figure 6-3 shows the typical brown-out scenarios. the reset delay (t bor + t pwrt ) is initiated each time v dd rises above the v bor trip point figure 6-3: brown-out situations v dd sysrst v bor v dd sysrst v bor v dd sysrst v bor t bor + t pwrt v dd dips before pwrt expires t bor + t pwrt t bor + t pwrt
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 120 ? 2009-2012 microchip technology inc. 6.4 external reset (extr) the external reset is gener ated by driving the mclr pin low. the mclr pin is a schmitt trigger input with an additional glitch filter. reset pulses that are longer than the minimum pulse width will generate a reset. refer to section 27.0 ?electri cal characteristics? for minimum pulse width specifications. the external reset (mclr ) pin (extr) bit in the reset control (rcon) register is set to indicate the mclr reset. 6.4.1 external supervisory circuit many systems have external supervisory circuits that generate reset signals to reset multiple devices in the system. this external reset signal can be directly connected to the mclr pin to reset the device when the rest of system is reset. 6.4.2 internal supervisory circuit when using the internal power supervisory circuit to reset the device, the external reset pin (mclr ) should be tied directly or resistively to v dd . in this case, the mclr pin will not be used to generate a reset. the external reset pin (mclr ) does not have an internal pull-up and must not be left unconnected. 6.5 software reset instruction (swr) whenever the reset instruction is executed, the device will assert sysrst , placing the device in a special reset state. this reset state will not re-initialize the clock. the clock source in effect prior to the reset instruction will remain. sysrst is released at the next instruction cycle and the reset vector fetch will commence. the software reset (swr) flag (instruction) in the reset control (rcon<6>) register is set to indicate the software reset. 6.6 watchdog timer time-out reset (wdto) whenever a watchdog timer time-out reset occurs, the device will asynchronously assert sysrst . the clock source will remain unchanged. a wdt time-out during sleep or idle mode will wake-up the processor, but will not reset the processor. the watchdog timer time-out (wdto) flag in the reset control (rcon<4>) register is set to indicate the watchdog timer reset. refer to section 24.4 ?watchdog timer (wdt)? for more information on the watchdog timer reset. 6.7 trap conflict reset if a lower priority hard trap occurs while a higher priority trap is being processed, a hard trap conflict reset occurs. the hard traps include exceptions of priority level 13 through level 15, inclusive. the address error (level 13) and oscillator error (level 14) traps fall into this category. the trap reset (trapr) flag in the reset control (rcon<15>) register is set to indicate the trap conflict reset. refer to section 7.0 ?interrupt controller? for more information on tr ap conflict resets. 6.8 illegal condition device reset an illegal condition device reset occurs due to the following sources: ? illegal opcode reset ? uninitialized w register reset ? security reset the illegal opcode or uninitialized w access reset (iopuwr) flag in the reset control (rcon<14>) register is set to indicate the ille gal condition device reset. 6.8.1 illegal opcode reset a device reset is generated if the device attempts to execute an illegal opcode value that is fetched from program memory. the illegal opcode reset function can prevent the device from executing program memory sections that are used to store constant data. to take advantage of the illegal opcode reset, use only the lower 16 bits of each program memory section to store the data values. the upper 8 bits should be programmed with 3fh, which is an illegal opcode value. 6.8.2 uninitialized w register reset any attempt to use the unin itialized w register as an address pointer will reset the device. the w register array (with the exception of w15) is cleared during all resets and is considered un initialized until written to. 6.8.3 security reset if a program flow change (pfc) or vector flow change (vfc) targets a restricted location in a protected segment (boot and secure segment), that operation will cause a security reset. the pfc occurs when the program counter is reloaded as a result of a call, jump, computed jump, return, return from subroutine or other fo rm of branch instruction. the vfc occurs when the program counter is reloaded with an interrupt or trap vector. refer to section 24.8 ?code protection and codeguard? security? for more information on security reset.
? 2009-2012 microchip technology inc. ds70591e-page 121 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 6.9 using the rcon status bits the user application can read the reset control (rcon) register after any device reset to determine the cause of the reset. table 6-2 provides a summary of the reset flag bit operation. table 6-2: reset flag bit operation note: the status bits in the rcon register should be cleared after they are read so that the next rcon register value after a device reset will be meaningful. flag bit set by: cleared by: trapr (rcon<15>) trap conflict event por, bor iopwr (rcon<14>) illegal opcode or uninitialized w register access or security reset por, bor extr (rcon<7>) mclr reset por swr (rcon<6>) reset instruction por, bor wdto (rcon<4>) wdt time-out pwrsav instruction, clrwdt instruction, por, bor sleep (rcon<3>) pwrsav #sleep instruction por, bor idle (rcon<2>) pwrsav #idle instruction por, bor bor (rcon<1>) por, bor ? por (rcon<0>) por ? note: all reset flag bits can be set or cleared by user software.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 122 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 123 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 7.0 interrupt controller the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 interrupt controller reduces the numerous perip heral interrupt request signals to a single interrupt request signal to the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 cpu. it has the following features: ? up to eight processor exceptions and software traps ? seven user-selectable priority levels ? interrupt vector table (ivt) with up to 118 vectors ? a unique vector for each interrupt or exception source ? fixed priority within a specified user priority level ? alternate interrupt vector table (aivt) for debug support ? fixed interrupt entry and return latencies 7.1 interrupt vector table the interrupt vector table (ivt) is shown in figure 7-1 . the ivt resides in program memory, starting at location 000004h. the ivt contains 126 vectors, consisting of eight nonmaskable trap vector s, plus up to 118 sources of interrupt. in general, each interrupt source has its own vector. each interrupt vector contains a 24-bit-wide address. the value programmed into each interrupt vector location is the starting address of the associated interrupt service routine (isr). interrupt vectors are prioritized in terms of their natural priority. this priority is linked to their position in the vector table. lower addresses generally have a higher natural priority. for example, the interrupt associated with vector 0 will take priority over interrupts at any other vector address. the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices implement up to 71 unique interrupts and five non-maskable traps. these are summarized in ta b l e 7 - 1 . 7.1.1 alternate interrupt vector ta b l e the alternate interrupt vector table (aivt) is located after the ivt, as shown in figure 7-1 . access to the aivt is provided by the altivt control bit (intcon2<15>). if the altivt bit is set, all interrupt and exception processes use the alternate vectors instead of the default vector s. the alternate vectors are organized in the same manner as the default vectors. the aivt supports debugging by providing a means to switch between an applicatio n and a support environ- ment without requiring the interrupt vectors to be reprogrammed. this feature also enables switching between applications for evaluation of different soft- ware algorithms at run time . if the aivt is not needed, the aivt should be programmed with the same addresses used in the ivt. 7.2 reset sequence a device reset is not a tr ue exception because the interrupt controller is not involved in the reset process. the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 device clears its registers in response to a reset, which forces the pc to zero. the digital signal controller (dsc) then begins program execution at location, 0x000000. a goto instruction at the reset address can redirect program execution to the approp riate start-up routine. note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 47. ?interrupts (part v)? (ds70597) in the ? dspic33f/ pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. note: any unimplemented or unused vector locations in the ivt and aivt should be programmed with the address of a default interrupt handler routine that contains a reset instruction.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 124 ? 2009-2012 microchip technology inc. figure 7-1: dspic33fj32gs406/606/608/ 610 and dspic33fj64gs406/606/608/610 interrupt vector table reset ? goto instruction 0x000000 reset ? goto address 0x000002 reserved 0x000004 oscillator fail trap vector address error trap vector stack error trap vector math error trap vector dma error trap vector reserved reserved interrupt vector 0 0x000014 interrupt vector 1 ~ ~ ~ interrupt vector 52 0x00007c interrupt vector 53 0x00007e interrupt vector 54 0x000080 ~ ~ ~ interrupt vector 116 0x0000fc interrupt vector 117 0x0000fe reserved 0x000100 reserved 0x000102 reserved oscillator fail trap vector address error trap vector stack error trap vector math error trap vector dma error trap vector reserved reserved interrupt vector 0 0x000114 interrupt vector 1 ~ ~ ~ interrupt vector 52 0x00017c interrupt vector 53 0x00017e interrupt vector 54 0x000180 ~ ~ ~ interrupt vector 116 interrupt vector 117 0x0001fe start of code 0x000200 decreasing natural order priority interrupt vector table (ivt) (1) alternate interrupt vector table (aivt) (1) note 1: see table 7-1 for the list of implemented interrupt vectors.
? 2009-2012 microchip technology inc. ds70591e-page 125 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 7-1: interrupt vectors vector number interrupt request (iqr) ivt address aivt address interrupt source highest natural order priority 8 0 0x000014 0x000114 int0 ? external interrupt 0 9 1 0x000016 0x000116 ic1 ? input capture 1 10 2 0x000018 0x000118 oc1 ? output compare 1 11 3 0x00001a 0x00011a t1 ? timer1 12 4 0x00001c 0x00011c dma0 ? dma channel 0 13 5 0x00001e 0x00011e ic2 ? input capture 2 14 6 0x000020 0x000120 oc2 ? output compare 2 15 7 0x000022 0x000122 t2 ? timer2 16 8 0x000024 0x000124 t3 ? timer3 17 9 0x000026 0x000126 spi1e ? spi1 fault 18 10 0x000028 0x000128 spi1 ? spi1 transfer done 19 11 0x00002a 0x00012a u1rx ? uart1 receiver 20 12 0x00002c 0x00012c u1tx ? uart1 transmitter 21 13 0x00002e 0x00012e adc ? adc group convert done 22 14 0x000030 0x000130 dma1 ? dma channel 1 23 15 0x000032 0x000132 reserved 24 16 0x000034 0x000134 si2c1 ? i2c1 slave event 25 17 0x000036 0x000136 mi2c1 ? i2c1 master event 26 18 0x000038 0x000138 cmp1 ? analog comparator 1 interrupt 27 19 0x00003a 0x00013a cn ? input change notification interrupt 28 20 0x00003c 0x00013c int1 ? external interrupt 1 29-31 21-23 0x00003e- 0x000042 0x00013e- 0x000142 reserved 32 24 0x000044 0x000144 dma2 ? dma channel 2 33 25 0x000046 0x000146 oc3 ? output compare 3 34 26 0x000048 0x000148 oc4 ? output compare 4 35 27 0x00004a 0x00014a t4 ? timer4 36 28 0x00004c 0x00014c t5 ? timer5 37 29 0x00004e 0x00014e int2 ? external interrupt 2 38 30 0x000050 0x000150 u2rx ? uart2 receiver 39 31 0x000052 0x000152 u2tx ? uart2 transmitter 40 32 0x000054 0x000154 spi2e ? spi2 error 41 33 0x000056 0x000156 spi2 ? spi2 transfer done 42 34 0x000058 0x000158 c1rx ? ecan1 receive data ready 43 35 0x00005a 0x00015a c1 ? ecan1 event 44 36 0x00005c 0x00015c dma3 ? dma channel 3 45 37 0x00005e 0x00015e ic3 ? input capture 3 46 38 0x000060 0x000160 ic4 ? input capture 4 47-56 39-48 0x000062- 0x000074 0x000162- 0x000174 reserved 57 49 0x000076 0x000176 si2c2 ? i2c2 slave events 58 50 0x000078 0x000178 mi2c2 ? i2c2 master events 59-60 51-52 0x00007a- 0x00007c 0x00017a- 0x00017c reserved 61 53 0x00007e 0x00017e int3 ? external interrupt 3 62 54 0x000080 0x000180 int4 ? external interrupt 4
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 126 ? 2009-2012 microchip technology inc. 63-64 55-56 0x000082- 0x000084 0x000182- 0x000184 reserved 65 57 0x000086 0x000186 pwm psem special event match 66 58 0x000088 0x000188 qei1 ? position counter compare 67-72 59-64 0x00008a- 0x000094 0x00018a- 0x000194 reserved 73 65 0x000096 0x000196 u1e ? uart1 error interrupt 74 66 0x000098 0x000198 u2e ? uart2 error interrupt 75-77 67-69 0x00009a- 0x00009e 0x00019a- 0x00019e reserved 78 70 0x0000a0 0x0001a0 c1tx ? ecan1 transmit data request 79 71 0x0000a2 0x0001a2 reserved 80 72 0x0000a4 0x0001a4 reserved 81 73 0x0000a6 0x0001a6 pwm secondary special event match 82 74 0x0000a8 0x0001a8 reserved 83 75 0x0000aa 0x0001aa qei2 ? position counter compare 84-88 76-80 0x0000ac- 0x0000b4 0x0001ac- 0x0001b4 reserved 89 81 0x0000b6 0x0001b6 adc pair 8 conversion done 90 82 0x0000b8 0x0001b8 adc pair 9 conversion done 91 83 0x0000ba 0x0001ba adc pair 10 conversion done 92 84 0x0000bc 0x0001bc adc pair 11 conversion done 93 85 0x0000be 0x0001be adc pair 12 conversion done 94-101 86-93 0x0000c0- 0x0000ce 0x0001c0- 0x0001ce reserved 102 94 0x0000d0 0x0001d0 pwm1 ? pwm1 interrupt 103 95 0x0000d2 0x0001d2 pwm2 ? pwm2 interrupt 104 96 0x0000d4 0x0001d4 pwm3 ? pwm3 interrupt 105 97 0x0000d6 0x0001d6 pwm4 ? pwm4 interrupt 106 98 0x0000d8 0x0001d8 pwm5 ? pwm5 interrupt 107 99 0x0000da 0x0001da pwm6 ? pwm6 interrupt 108 100 0x0000dc 0x0001dc pwm7? pwm7 interrupt 109 101 0x0000de 0x0001de pwm8 ? pwm8 interrupt 110 102 0x0000e0 0x0001e0 pwm9 ? pwm9 interrupt 111 103 0x0000e2 0x00001e2 cmp2 ? analog comparator 2 112 104 0x0000e4 0x0001e4 cmp3 ? analog comparator 3 113 105 0x0000e6 0x0001e6 cmp4 ? analog comparator 4 114-117 106-109 0x0000e8- 0x0000ee 0x0001e8- 0x0001ee reserved 118 110 0x0000f0 0x0001f0 adc pair 0 convert done 119 111 0x0000f2 0x0001f2 adc pair 1 convert done 120 112 0x0000f4 0x0001f4 adc pair 2 convert done 121 113 0x0000f6 0x0001f6 adc pair 3 convert done 122 114 0x0000f8 0x0001f8 adc pair 4 convert done 123 115 0x0000fa 0x0001fa adc pair 5 convert done 124 116 0x0000fc 0x0001fc adc pair 6 convert done 125 117 0x0000fe 0x0001fe adc pair 7 convert done lowest natural order priority table 7-1: interrupt vectors (continued) vector number interrupt request (iqr) ivt address aivt address interrupt source
? 2009-2012 microchip technology inc. ds70591e-page 127 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 7.3 interrupt control and status registers the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 devices implement 44 registers for the interrupt controller: ? intcon1 ? intcon2 ?ifsx ?iecx ?ipcx ?inttreg 7.3.1 intcon1 and intcon2 global interrupt control functions are controlled from intcon1 and intcon2. intcon1 contains the interrupt nesting disable (nstdis) bit as well as the control and status flags for the processor trap sources. the intcon2 register contro ls the external interrupt request signal behavior and the use of the alternate interrupt vector table. 7.3.2 ifsx the ifsx registers maintain all of the interrupt request flags. each source of interrupt has a status bit, which is set by the respective peripherals or external signal and is cleared via software. 7.3.3 iecx the iecx registers maintain all of the interrupt enable bits. these control bits are used to individually enable interrupts from the peripherals or external signals. 7.3.4 ipcx the ipcx registers are used to set the interrupt priority level for each source of interrupt. each user interrupt source can be assigned to one of eight priority levels. 7.3.5 inttreg the inttreg register contains the associated interrupt vector number and the new cpu interrupt priority level, which are latched into the vector num- ber (vecnum<6:0>) and interrupt level (ilr<3:0>) bit fields in the inttreg re gister. the new interrupt priority level is the priority of the pending interrupt. the interrupt sources are assigned to the ifsx, iecx and ipcx registers in the same sequence that they are listed in ta b l e 7 - 1 . for example, the int0 (external interrupt 0) is shown as having vector number 8 and a natural order priority of 0. thus, the int0if bit is found in ifs0<0>, the int0ie bit is found in iec0<0> and the int0ip bits are found in the first position of ipc0 (ipc0<2:0>). 7.3.6 status/control registers although they are not specific ally part of the interrupt control hardware, two of the cpu control registers contain bits that contro l interrupt functionality. ? the cpu status register, sr, contains the ipl<2:0> bits (sr<7:5>). these bits indicate the current cpu interrupt priority level. the user can change the current cpu priority level by writing to the ipl bits. ? the corcon register contains the ipl3 bit, which together with ipl<2:0>, indicates the current cpu priority level. ipl3 is a read-only bit so that trap events cannot be masked by the user software. all interrupt registers are described in register 7-1 through register 7-46 in the following pages.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 128 ? 2009-2012 microchip technology inc. register 7-1: sr: cpu status register ( 1 ) register 7-2: corcon: core control register ( 1 ) r-0 r-0 r/c-0 r/c-0 r-0 r/c-0 r-0 r/w-0 oa ob sa sb oab sab da dc bit 15 bit 8 r/w-0 ( 3 ) r/w-0 ( 3 ) r/w-0 ( 3 ) r-0 r/w-0 r/w-0 r/w-0 r/w-0 ipl2 ( 2 ) ipl1 ( 2 ) ipl0 ( 2 ) ra n ov z c bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-5 ipl<2:0>: cpu interrupt priority level status bits ( 2 , 3 ) 111 = cpu interrupt priority level is 7 (15), user interrupts are disabled 110 = cpu interrupt priority level is 6 (14) 101 = cpu interrupt priority level is 5 (13) 100 = cpu interrupt priority level is 4 (12) 011 = cpu interrupt priority level is 3 (11) 010 = cpu interrupt priority level is 2 (10) 001 = cpu interrupt priority level is 1 (9) 000 = cpu interrupt priority level is 0 (8) note 1: for complete register details, see register 3-1 . 2: the ipl<2:0> bits are concatenated with the ipl<3> bi t (corcon<3>) to form the cpu interrupt priority level. the value in parentheses indicates the ipl if ipl<3> = 1 . user interrupts are disabled when ipl<3> = 1 . 3: the ipl<2:0> status bits are read -only when nstdis (intcon1<15>) = 1 . u-0 u-0 u-0 r/w-0 r/w-0 r-0 r-0 r-0 ? ? ? us edt dl<2:0> bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-0 r/c-0 r/w-0 r/w-0 r/w-0 sata satb satdw accsat ipl3 ( 2 ) psv rnd if bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit -n = value at por ?1? = bit is set 0? = bit is cleared ?x = bit is unknow n u = unimplemented bit, read as ?0? bit 3 ipl3: cpu interrupt priority level status bit 3 ( 2 ) 1 = cpu interrupt priority level is greater than 7 0 = cpu interrupt priority level is 7 or less note 1: for complete register details, see register 3-2 . 2: the ipl3 bit is concatenated with t he ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level.
? 2009-2012 microchip technology inc. ds70591e-page 129 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-3: intcon1: interrupt control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 sftacerr div0err dmacerr matherr addrerr stkerr oscfail ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 nstdis: interrupt nesting disable bit 1 = interrupt nesting is disabled 0 = interrupt nesting is enabled bit 14 ovaerr: accumulator a overflow trap flag bit 1 = trap was caused by overflow of accumulator a 0 = trap was not caused by overflow of accumulator a bit 13 ovberr: accumulator b overflow trap flag bit 1 = trap was caused by overflow of accumulator b 0 = trap was not caused by overflow of accumulator b bit 12 covaerr: accumulator a catastrophic overflow trap flag bit 1 = trap was caused by catastrophic overflow of accumulator a 0 = trap was not caused by catastrophic overflow of accumulator a bit 11 covberr: accumulator b catastrophic overflow trap flag bit 1 = trap was caused by catastrophic overflow of accumulator b 0 = trap was not caused by catastrophic overflow of accumulator b bit 10 ovate: accumulator a overflow trap enable bit 1 = trap overflow of accumulator a 0 = trap is disabled bit 9 ovbte: accumulator b overflow trap enable bit 1 = trap overflow of accumulator b 0 = trap is disabled bit 8 covte: catastrophic overflow trap enable bit 1 = trap on catastrophic overflow of accumulator a or b is enabled 0 = trap is disabled bit 7 sftacerr: shift accumulator error status bit 1 = math error trap was caused by an invalid a ccumulator shift 0 = math error trap was not caused by an invalid accumulator shift bit 6 div0err: arithmetic error status bit 1 = math error trap was ca used by a divide-by-zero 0 = math error trap was not caused by a divide-by-zero bit 5 dmacerr: dma controller error status bit 1 = dma controller error trap has occurred 0 = dma controller error trap has not occurred bit 4 matherr: arithmetic error status bit 1 = math error trap has occurred 0 = math error trap has not occurred
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 130 ? 2009-2012 microchip technology inc. bit 3 addrerr: address error trap status bit 1 = address error trap has occurred 0 = address error trap has not occurred bit 2 stkerr: stack error trap status bit 1 = stack error trap has occurred 0 = stack error trap has not occurred bit 1 oscfail: oscillator failure trap status bit 1 = oscillator failure trap has occurred 0 = oscillator failure trap has not occurred bit 0 unimplemented: read as ? 0 ? register 7-3: intcon1: interrupt control register 1 (continued)
? 2009-2012 microchip technology inc. ds70591e-page 131 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-4: intcon2: interrupt control register 2 r/w-0 r-0 u-0 u-0 u-0 u-0 u-0 u-0 altivt disi ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? int4ep int3ep int2ep int1ep int0ep bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 altivt: enable alternate interrupt vector table bit 1 = uses alternate interrupt vector table 0 = uses standard (default) interrupt vector table bit 14 disi: disi instruction status bit 1 = disi instruction is active 0 = disi instruction is not active bit 13-5 unimplemented: read as ? 0 ? bit 4 int4ep: external interrupt 4 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 3 int3ep: external interrupt 3 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 2 int2ep: external interrupt 2 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 1 int1ep: external interrupt 1 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 0 int0ep: external interrupt 0 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 132 ? 2009-2012 microchip technology inc. register 7-5: ifs0: interrupt flag status register 0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? dma1if adif u1txif u1r xif spi1if spi1eif t3if bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 t2if oc2if ic2if dma0if t1if oc1if ic1if int0if bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14 dma1if: dma channel 1 data transfer complete interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 13 adif: adc group conversion complete interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 12 u1txif: uart1 transmitter interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 11 u1rxif: uart1 receiver interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 10 spi1if: spi1 event interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 9 spi1eif: spi1 fault interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 8 t3if: timer3 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 7 t2if: timer2 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 6 oc2if: output compare channel 2 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5 ic2if: input capture channel 2 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4 dma0if: dma channel 0 data transfer complete interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 3 t1if: timer1 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred
? 2009-2012 microchip technology inc. ds70591e-page 133 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 2 oc1if: output compare channel 1 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 ic1if: input capture channel 1 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 int0if: external interrupt 0 flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred register 7-5: ifs0: interrupt flag status register 0 (continued)
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 134 ? 2009-2012 microchip technology inc. register 7-6: ifs1: interrupt flag status register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u2txif u2rxif int2if t5if t4if oc4if oc3if dma2if bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? int1if cnif ac1if mi2c1if si2c1if bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 12 u2txif: uart2 transmitter interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 11 u2rxif: uart2 receiver interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 13 int2if: external interrupt 2 flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 12 t5if: timer5 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 11 t4if: timer4 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 10 oc4if: output compare channel 4 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 9 oc3if: output compare channel 3 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 8 dma2if: dma channel 2 data transfer complete interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 7-5 unimplemented: read as ? 0 ? bit 4 int1if: external interrupt 1 flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 3 cnif: input change notification interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 ac1if: analog comparator 1 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 mi2c1if: i2c1 master events interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 si2c1if: i2c1 slave events interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred
? 2009-2012 microchip technology inc. ds70591e-page 135 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-7: ifs2: interrupt flag status register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ic4if ic3if dma3if c1if ( 1 ) c1rxif ( 1 ) spi2if spi2eif bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as ? 0 ? bit 6 ic4if: input capture channel 4 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5 ic3if: input capture channel 3 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4 dma3if: dma channel 3 data transfer complete interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 3 c1if: ecan1 event interrupt flag status bit ( 1 ) 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 c1rxif: ecan1 external event in terrupt flag status bit ( 1 ) 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 spi2if: spi2 event interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 spi2eif: spi2 error interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred note 1: interrupts are disabled on devices without ecan? modules.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 136 ? 2009-2012 microchip technology inc. register 7-8: ifs3: interrupt flag status register 3 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 u-0 ? ? ? ? ? qei1if psemif ? bit 15 bit 8 u-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 u-0 ? int4if int3if ? ? mi2c2if si2c2if ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10 qei1if: qei1 event interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 9 psemif: pwm special event match interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 8-7 unimplemented: read as ? 0 ? bit 6 int4if: external interrupt 4 flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5 int3if: external interrupt 3 flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4-3 unimplemented: read as ? 0 ? bit 2 mi2c2if: i2c2 master events interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 si2c2if: i2c2 slave events interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 137 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-9: ifs4: interrupt flag status register 4 u-0 u-0 u-0 u-0 r/w-0 u-0 r/w-0 u-0 ? ? ? ?qei2if ? psesmif ? bit 15 bit 8 u-0 r/w-0 u-0 u-0 u-0 r/w-0 r/w-0 u-0 ?c1txif ( 1 ) ? ? ?u2eifu1eif ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11 qei2if: qei2 event interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 10 unimplemented: read as ? 0 ? bit 9 psesmif: pwm special event secondary match interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 8-7 unimplemented: read as ? 0 ? bit 6 c1txif: ecan1 transmit data request interrupt flag status bit ( 1 ) 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5-3 unimplemented: read as ? 0 ? bit 2 u2eif: uart2 error interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 u1eif: uart1 error interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 unimplemented: read as ? 0 ? note 1: interrupts are disabled on devices without ecan? modules.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 138 ? 2009-2012 microchip technology inc. register 7-10: ifs5: interrupt flag status register 5 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 pwm2if pwm1if adcp12if ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 ? ? ? adcp11if adcp10if adcp9if adcp8if ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 pwm2if: pwm2 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 14 pwm1if: pwm1 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 13 adcp12if: adc pair 12 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 12-5 unimplemented: read as ? 0 ? bit 4 adcp11if: adc pair 11 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 3 adcp10if: adc pair 10 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 adcp9if: adc pair 9 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 adcp8if: adc pair 8 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 139 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-11: ifs6: interrupt flag status register 6 r/w-0 r/w-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 adcp1if adcp0if ? ? ? ?ac4ifac3if bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ac2if pwm9if pwm8if pwm7if p wm6if pwm5if pwm4if pwm3if bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 adcp1if: adc pair 1 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 14 adcp0if: adc pair 0 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 13-10 unimplemented: read as ? 0 ? bit 9 ac4if: analog comparator 4 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 8 ac3if: analog comparator 3 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 7 ac2if: analog comparator 2 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 6 pwm9if: pwm9 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5 pwm8if: pwm8 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4 pwm7if: pwm7 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 3 pwm6if: pwm6 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 pwm5if: pwm5 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 pwm4if: pwm4 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 pwm3if: pwm3 interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 140 ? 2009-2012 microchip technology inc. register 7-12: ifs7: interrupt flag status register 7 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? adcp7if adcp6if adcp5if adcp4if adcp3if adcp2if bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as ? 0 ? bit 5 adcp7if: adc pair 7 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4 adcp6if: adc pair 6 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 3 adcp5if: adc pair 5 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 adcp4if: adc pair 4 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 1 adcp3if: adc pair 3 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 adcp2if: adc pair 2 conversion done interrupt flag status bit 1 = interrupt request has occurred 0 = interrupt request has not occurred
? 2009-2012 microchip technology inc. ds70591e-page 141 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-13: iec0: interrupt enable control register 0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? dma1ie adie u1txie u1rxie spi1ie spi1eie t3ie bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 t2ie oc2ie ic2ie dma0ie t1ie oc1ie ic1ie int0ie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14 dma1ie: dma channel 1 data transfer complete interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 13 adie: adc1 conversion complete interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 12 u1txie: uart1 transmitter interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 11 u1rxie: uart1 receiver interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 10 spi1ie: spi1 event interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 9 spi1eie: spi1 event interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 8 t3ie: timer3 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 7 t2ie: timer2 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 6 oc2ie: output compare channel 2 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 5 ic2ie: input capture channel 2 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 4 dma0ie: dma channel 0 data transfer complete interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 3 t1ie: timer1 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 142 ? 2009-2012 microchip technology inc. bit 2 oc1ie: output compare channel 1 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 1 ic1ie: input capture channel 1 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 0 int0ie: external interrupt 0 enable bit 1 = interrupt request enabled 0 = interrupt request not enabled register 7-13: iec0: interrupt enable control register 0 (continued)
? 2009-2012 microchip technology inc. ds70591e-page 143 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-14: iec1: interrupt enable control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie dma2ie bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? int1ie cnie ac1ie mi2c1ie si2c1ie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 12 u2txie: uart2 transmitter interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 11 u2rxie: uart2 receiver interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 13 int2ie: external interrupt 2 enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 12 t5ie: timer5 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 11 t4ie: timer4 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 10 oc4ie: output compare channel 4 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 9 oc3ie: output compare channel 3 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 8 dma2ie: dma channel 2 data transfer complete interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 7-5 unimplemented: read as ? 0 ? bit 4 int1ie: external interrupt 1 enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 3 cnie: input change notification interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 2 ac1ie: analog comparator 1 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 1 mi2c1ie: i2c1 master events interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 0 si2c1ie: i2c1 slave events interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 144 ? 2009-2012 microchip technology inc. register 7-15: iec2: interrupt enable control register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ic4ie ic3ie dma3ie c1ie ( 1 ) c1rxie ( 1 ) spi2ie spi2eie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as ? 0 ? bit 6 ic4ie: input capture channel 4 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 5 ic3ie: input capture channel 3 interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 4 dma3ie: dma channel 3 data transfer complete interrupt enable bit 1 = interrupt request enabled 0 = interrupt request has enabled bit 3 c1ie: ecan1 event interrupt enable bit ( 1 ) 1 = interrupt request enabled 0 = interrupt request not enabled bit 2 c1rxie: ecan1 receive data ready interrupt enable bit ( 1 ) 1 = interrupt request enabled 0 = interrupt request not enabled bit 1 spi2ie: spi2 event interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 0 spi2eie: spi2 error interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled note 1: interrupts are disabled on devices without ecan? modules.
? 2009-2012 microchip technology inc. ds70591e-page 145 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-16: iec3: interrupt enable control register 3 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 u-0 ? ? ? ? ? qei1ie psemie ? bit 15 bit 8 u-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 u-0 ?int4ieint3ie ? ? mi2c2ie si2c2ie ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10 qei1ie: qei1 event interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 9 psemie: pwm special event matc h interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 8-7 unimplemented: read as ? 0 ? bit 6 int4ie: external interrupt 4 enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 6 int3ie: external interrupt 3 enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 4-3 unimplemented: read as ? 0 ? bit 2 mi2c2ie: i2c2 master events interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 1 si2c2ie: i2c2 slave events interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 146 ? 2009-2012 microchip technology inc. register 7-17: iec4: interrupt enable control register 4 u-0 u-0 u-0 u-0 r/w-0 u-0 r/w-0 u-0 ? ? ? ?qei2ie ? psesmie ? bit 15 bit 8 u-0 r/w-0 u-0 u-0 u-0 r/w-0 r/w-0 u-0 ?c1txie ( 1 ) ? ? ?u2eieu1eie ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11 qei2ie: qei2 event inte rrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 10 unimplemented: read as ? 0 ? bit 9 psesmie: pwm special event secondary match error interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 8-7 unimplemented: read as ? 0 ? bit 6 c1txie: ecan1 transmit data request interrupt enable bit ( 1 ) 1 = interrupt request occurred 0 = interrupt request not occurred bit 5-3 unimplemented: read as ? 0 ? bit 2 u2eie: uart2 error interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 1 u1eie: uart1 error interrupt enable bit 1 = interrupt request enabled 0 = interrupt request not enabled bit 0 unimplemented: read as ? 0 ? note 1: interrupts are disabled on devices without ecan? modules.
? 2009-2012 microchip technology inc. ds70591e-page 147 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-18: iec5: interrupt enable control register 5 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 pwm2ie pwm1ie adcp12ie ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 ? ? ? ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 pwm2ie: pwm2 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 14 pwm1ie: pwm1 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 13 adcp12ie: adc pair 12 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 12-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 148 ? 2009-2012 microchip technology inc. register 7-19: iec6: interrupt enable control register 6 r/w-0 r/w-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 adcp1ie adcp0ie ? ? ? ?ac4ieac3ie bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ac2ie ? ? ? pwm6ie pwm5ie pwm4ie pwm3ie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 adcp1ie: adc pair 1 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 14 adcp0ie: adc pair 0 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 13-10 unimplemented: read as ? 0 ? bit 9 ac4ie: analog comparator 4 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 8 ac3ie: analog comparator 3 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 7 ac2ie: analog comparator 2 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 6-4 unimplemented: read as ? 0 ? bit 3 pwm6ie: pwm6 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 2 pwm5ie: pwm5 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 1 pwm4ie: pwm4 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 0 pwm3ie: pwm3 interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled
? 2009-2012 microchip technology inc. ds70591e-page 149 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-20: iec7: interrupt enable control register 7 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? adcp7ie adcp6ie adcp5ie adcp4ie adcp3ie adcp2ie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as ? 0 ? bit 5 adcp7ie: adc pair 7 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 4 adcp6ie: adc pair 6 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 3 adcp5ie: adc pair 5 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 2 adcp4ie: adc pair 4 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 1 adcp3ie: adc pair 3 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 0 adcp2ie: adc pair 2 conversion done interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 150 ? 2009-2012 microchip technology inc. register 7-21: ipc0: interrupt priority control register 0 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? t1ip<2:0> ?oc1ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ?ic1ip<2:0> ? int0ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 t1ip<2:0>: timer1 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 oc1ip<2:0>: output compare channel 1 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 ic1ip<2:0>: input capture channel 1 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 int0ip<2:0>: external interrupt 0 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
? 2009-2012 microchip technology inc. ds70591e-page 151 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-22: ipc1: interrupt priority control register 1 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? t2ip<2:0> ?oc2ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ?ic2ip<2:0> ?dma0ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 t2ip<2:0>: timer2 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 oc2ip<2:0>: output compare channel 2 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 ic2ip<2:0>: input capture channel 2 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 dma0ip<2:0>: dma channel 0 data transfer co mplete interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 152 ? 2009-2012 microchip technology inc. register 7-23: ipc2: interrupt priority control register 2 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? u1rxip<2:0> ? spi1ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? spi1eip<2:0> ? t3ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 u1rxip<2:0>: uart1 receiver interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 spi1ip<2:0>: spi1 event interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 spi1eip<2:0>: spi1 error interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 t3ip<2:0>: timer3 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
? 2009-2012 microchip technology inc. ds70591e-page 153 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-24: ipc3: interrupt priority control register 3 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ?dma1ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ?adip<2:0> ? u1txip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-8 dma1ip<2:0>: dma channel 1 data transfer co mplete interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 adip<2:0>: adc1 conversion complete interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 u1txip<2:0>: uart1 transmitter interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 154 ? 2009-2012 microchip technology inc. register 7-25: ipc4: interrupt priority control register 4 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? cnip<2:0> ? ac1ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? mi2c1ip<2:0> ? si2c1ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 cnip<2:0>: change notification interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 ac1ip<2:0>: analog comparator 1 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 mi2c1ip<2:0>: i2c1 master events interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 si2c1ip<2:0>: i2c1 slave events interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
? 2009-2012 microchip technology inc. ds70591e-page 155 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-26: ipc5: interrupt priority control register 5 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ? int1ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 unimplemented: read as ? 0 ? bit 2-0 int1ip<2:0>: external interrupt 1 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 156 ? 2009-2012 microchip technology inc. register 7-27: ipc6: interrupt priority control register 6 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? t4ip<2:0> ?oc4ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? oc3ip<2:0> ?dma2ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 t4ip<2:0>: timer4 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 oc4ip<2:0>: output compare channel 4 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 oc3ip<2:0>: output compare channel 3 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 dma2ip<2:0>: dma channel 2 data transfer complete interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
? 2009-2012 microchip technology inc. ds70591e-page 157 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-28: ipc7: interrupt priority control register 7 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? u2txip<2:0> ? u2rxip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? int2ip<2:0> ? t5ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 u2txip<2:0>: uart2 transmitter interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 u2rxip<2:0>: uart2 receiver interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 int2ip<2:0>: external interrupt 2 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 t5ip<2:0>: timer5 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 158 ? 2009-2012 microchip technology inc. register 7-29: ipc8: interrupt priority control register 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? c1ip<2:0> ( 1 ) ? c1rxip<2:0> ( 1 ) bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? spi2ip<2:0> ? spi2eip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 c1ip<2:0>: ecan1 event interrupt priority bits ( 1 ) 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 c1rxip<2:0>: ecan1 receive data ready interrupt priority bits ( 1 ) 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 spi2ip<2:0>: spi2 event interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 spi2eip<2:0>: spi2 error interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled note 1: interrupts are disabled on devices without ecan? modules.
? 2009-2012 microchip technology inc. ds70591e-page 159 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-30: ipc9: interrupt priority control register 9 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ? ic4ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ?ic3ip<2:0> ?dma3ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-8 ic4ip<2:0>: input capture channel 4 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 ic3ip<2:0>: input capture channel 3 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 dma3ip<2:0>: dma channel 3 data transfer co mplete interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 160 ? 2009-2012 microchip technology inc. register 7-31: ipc12: interrupt priority control register 12 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ? mi2c2ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 ? si2c2ip<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-8 mi2c2ip<2:0>: i2c2 master events interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 si2c2ip<2:0>: i2c2 slave events interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 161 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-32: ipc13: interrupt priority control register 13 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ? int4ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 ? int3ip<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-8 int4ip<2:0>: external interrupt 4 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 int3ip<2:0>: external interrupt 3 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 162 ? 2009-2012 microchip technology inc. register 7-33: ipc14: interrupt priority control register 14 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ? qei1ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 ? psemip<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-8 qei1ip<2:0>: qei1 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 psemip<2:0>: pwm special event match interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 163 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-34: ipc16: interrupt priority control register 16 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ? u2eip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 ?u1eip<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-8 u2eip<2:0>: uart2 error interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 u1eip<2:0>: uart1 error interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 164 ? 2009-2012 microchip technology inc. register 7-35: ipc17: interrupt priority control register 17 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-0 r/w-0 ? ? ? ? ? c1txip<2:0> ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-8 c1txip<2:0>: ecan1 transmit data request interrupt priority bits ( 1 ) 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7-0 unimplemented: read as ? 0 ? note 1: interrupts are disabled on devices without ecan? modules.
? 2009-2012 microchip technology inc. ds70591e-page 165 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-36: ipc18: interrupt priority control register 18 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 ? qei2ip<2:0> ? ? ? ? bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 ? psesmip<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 qei2ip<2:0>: qei2 interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11-7 unimplemented: read as ? 0 ? bit 6-4 psesmip<2:0>: pwm special event secondary ma tch interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 166 ? 2009-2012 microchip technology inc. register 7-37: ipc20: interrupt priority control register 20 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? adcp10ip<2:0> ? adcp9ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 ? adcp8ip<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 adcp10ip<2:0>: adc pair 10 conversion done interrupt 1 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 adcp9ip<2:0>: adc pair 9 conversion done interrupt 1 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 adcp8ip<2:0>: adc pair 8 conversion done interrupt 1 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 167 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-38: ipc21: interrupt priority control register 21 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? adcp12ip<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as ? 0 ? bit 6-4 adcp12ip<2:0>: adc pair 12 conversion done interrupt 1 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 168 ? 2009-2012 microchip technology inc. register 7-39: ipc23: interrupt priority control register 23 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? pwm2ip<2:0> ? pwm1ip<2:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 pwm2ip<2:0>: pwm2 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 pwm1ip<2:0>: pwm1 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 169 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-40: ipc24: interrupt priority control register 24 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? pwm6ip<2:0> ? pwm5ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? pwm4ip<2:0> ? pwm3ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 pwm6ip<2:0>: pwm6 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 pwm5ip<2:0>: pwm5 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 pwm4ip<2:0>: pwm4 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 pwm3ip<2:0>: pwm3 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 170 ? 2009-2012 microchip technology inc. register 7-41: ipc25: interrupt priority control register 25 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ?ac2ip<2:0> ? pwm9ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? pwm8ip<2:0> ? pwm7ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 ac2ip<2:0>: analog comparator 2 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 pwm9ip<2:0>: pwm9 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 pwm8ip<2:0>: pwm8 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 pwm7ip<2:0>: pwm7 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
? 2009-2012 microchip technology inc. ds70591e-page 171 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-42: ipc26: interrupt priority contro l register 26 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? ac4ip<2:0> ?ac3ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as ? 0 ? bit 6-4 ac4ip<2:0>: analog comparator 4 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 ac3ip<2:0>: analog comparator 3 interrupt priority bits 111 = interrupt is priority 7 (highest priority) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 172 ? 2009-2012 microchip technology inc. register 7-43: ipc27: interrupt priority control register 27 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? adcp1ip<2:0> ? adcp0ip<2:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 adcp1ip<2:0>: adc pair 1 conversion done interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 adcp0ip<2:0>: adc pair 0 conversion done interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 173 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-44: ipc28: interrupt priority control register 28 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? adcp5ip<2:0> ? adcp4ip<2:0> bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? adcp3ip<2:0> ? adcp2ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 adcp5ip<2:0>: adc pair 5 conversion done interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 11 unimplemented: read as ? 0 ? bit 10-8 adcp4ip<2:0>: adc pair 4 conversion done interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 7 unimplemented: read as ? 0 ? bit 6-4 adcp3ip<2:0>: adc pair 3 conversion done interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 adcp2ip<2:0>: adc pair 2 conversion done interrupt priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 174 ? 2009-2012 microchip technology inc. register 7-45: ipc29: interrupt priority control register 29 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 r/w-1 r/w-0 r/w-0 u-0 r/w-1 r/w-0 r/w-0 ? adcp7ip<2:0> ? adcp6ip<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as ? 0 ? bit 6-4 adcp7ip<2:0>: adc pair 7 conversion done interrupt 1 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled bit 3 unimplemented: read as ? 0 ? bit 2-0 adcp6ip<2:0>: adc pair 6 conversion done interrupt 1 priority bits 111 = interrupt is priority 7 (highest priority interrupt) ? ? ? 001 = interrupt is priority 1 000 = interrupt source is disabled
? 2009-2012 microchip technology inc. ds70591e-page 175 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 7-46: inttreg: interrup t control and status register u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 ? ? ? ?ilr<3:0> bit 15 bit 8 u-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 ? vecnum<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11-8 ilr<3:0>: new cpu interrupt priority level bits 1111 = cpu interrupt priority level is 15 ? ? ? 0001 = cpu interrupt priority level is 1 0000 = cpu interrupt priority level is 0 bit 7 unimplemented: read as ? 0 ? bit 6-0 vecnum<6:0>: vector number of pending interrupt bits 0111111 = interrupt vector pending is number 135 ? ? ? 0000001 = interrupt vector pending is number 9 0000000 = interrupt vector pending is number 8
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 176 ? 2009-2012 microchip technology inc. 7.4 interrupt setup procedures 7.4.1 initialization complete the following steps to configure an interrupt source at initialization: 1. set the nstdis bit (intcon1<15>) if nested interrupts are not desired. 2. select the user-assigned priority level for the interrupt source by writing the control bits in the appropriate ipcx register. the priority level will depend on the specific application and type of interrupt source. if multiple priority levels are not desired, the ipcx register control bits for all enabled interrupt sources can be programmed to the same non-zero value. 3. clear the interrupt flag status bit associated with the peripheral in the associated ifsx register. 4. enable the interrupt source by setting the interrupt enable control bit associated with the source in the appropriate iecx register. 7.4.2 interrupt service routine the method used to declare an isr and initialize the ivt with the correct vector address depends on the programming language (c or assembler) and the language development toolsuite used to develop the application. in general, the user application must clear the interrupt flag in the appropriate ifsx register for the source of interrupt that the isr handl es. otherwise, program will re-enter the isr immediately after exiting th e routine. if the isr is coded in assembly language, it must be terminated using a retfie instruction to unstack the saved pc value, srl value and old cpu priority level. 7.4.3 trap service routine a trap service routine (tsr) is coded like an isr, except that the appropriate trap status flag in the intcon1 register must be cleared to avoid re-entry into the tsr. 7.4.4 interrupt disable the following steps outline t he procedure to disable all user interrupts: 1. push the current sr value onto the software stack using the push instruction. 2. force the cpu to priority level 7 by inclusive oring the value eoh with srl. to enable user interrupts, the pop instruction can be used to restore the previous sr value. the disi instruction provides a convenient way to disable interrupts of priority levels 1-6 for a fixed period of time. level 7 interrupt sources are not disabled by the disi instruction. note: at a device reset, the ipcx registers are initialized such that all user interrupt sources are assigned to priority level 4. note: only user interrupts with a priority level of 7 or lower can be disabled. trap sources (level 8-level 15) cannot be disabled.
? 2009-2012 microchip technology inc. ds70591e-page 177 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 8.0 direct memory access (dma) direct memory access (dma) is a very efficient mechanism of copying data between peripheral sfrs (e.g., the uart receive register and input capture 1 buffer) and buffers or variables stored in ram, with minimal cpu intervention. the dma controller (dmac) can automatically c opy entire blocks of data without requiring the user software to read or write the peripheral special function registers (sfrs) every time a peripheral interrupt occurs. the dma controller uses a dedicated bus for dat a transfers and, therefore, does not steal cycles from the code execut ion flow of the cpu. to exploit the dma capability, the corresponding user buffers or variables must be located in dma ram. the peripherals that can utilize dma are listed in table 8-1 along with their associated interrupt request (irq) numbers. table 8-1: dma controller channel to peripheral associations note 1: this data sheet summarizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 family of devices. however, it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 22. ?direct memory access (dma)? (ds70182) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. note: the dma module is not available on dsipc33fj32gs406/606/608/610 and dspic33fj64gs406 devices. peripheral to dma association dmaxreq register irqsel<6:0> bits dmaxpad register values to read from peripheral dmaxpad register values to write to peripheral int0 ? external interrupt 0 0000000 ?? ic1 ? input capture 1 0000001 0x0140 (ic1buf) ? ic2 ? input capture 2 0000101 0x0144 (ic2buf) ? ic3 ? input capture 3 0100101 0x0148 (ic3buf) ? ic4 ? input capture 4 0100110 0x014c (ic4buf) ? oc1 ? output compare 1 data 0000010 ? 0x0182 (oc1r) oc1 ? output compare 1 secondary data 0000010 ? 0x0180 (oc1rs) oc2 ? output compare 2 data 0000110 ? 0x0188 (oc2r) oc2 ? output compare 2 secondary data 0000110 ? 0x0186 (oc2rs) oc3 ? output compare 3 data 0011001 ? 0x018e (oc3r) oc3 ? output compare 3 secondary data 0011001 ? 0x018c (oc3rs) oc4 ? output compare 4 data 0011010 ? 0x0194 (oc4r) oc4 ? output compare 4 secondary data 0011010 ? 0x0192 (oc4rs) tmr2 ? timer2 0000111 ?? tmr3 ? timer3 0001000 ?? tmr4 ? timer4 0011011 ?? tmr5 ? timer5 0011100 ?? spi1 ? transfer done 0001010 0x0248 (spi1buf) 0x0248 (spi1buf) spi2 ? transfer done 0100001 0x0268 (spi2buf) 0x0268 (spi2buf) uart1rx ? uart1 receiver 0001011 0x0226 (u1rxreg) ? uart1tx ? uart1 transmitter 0001100 ? 0x0224 (u1txreg) uart2rx ? uart2 receiver 0011110 0x0236 (u2rxreg) ? uart2tx ? uart2 transmitter 0011111 ? 0x0234 (u2txreg) ecan1 ? rx data ready 0100010 0x0640 (c1rxd) ? ecan1 ? tx data request 1000110 ? 0x0642 (c1txd)
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 178 ? 2009-2012 microchip technology inc. the dma controller features four identical data transfer channels. each channel has its own set of control and status registers. each dma channel can be configured to copy data either from buffers stored in dual port dma ram to peripheral sfrs or from peripheral sfrs to buffers in dma ram. the dma controller supports the following features: ? word or byte-sized data transfers. ? transfers from peripheral to dma ram or dma ram to peripheral ? indirect addressing of dma ram locations with or without automatic post-increment ? peripheral indirect addressing ? in some peripherals, the dma ram read/write addresses may be partially derived from the peripheral ? one-shot block transfers ? terminating dma transfer after one block transfer ? continuous block transfers ? reloading dma ram buffer start address after every block transfer is complete ? ping-pong mode ? switching between two dma ram start addresses between successive block transfers, thereby filling two buffers alternately ? automatic or manual initiation of block transfers for each dma channel, a dma interrupt request is generated when a block transfer is complete. alternatively, an interrupt can be generated when half of the block has been filled. 8.1 dmac registers each dmac channel x (x = 0, 1, 2 or 3) contains the following registers: ? a 16-bit dma channel control register (dmaxcon) ? a 16-bit dma channel irq select register (dmaxreq) ? a 16-bit dma ram primary start address offset register (dmaxsta) ? a 16-bit dma ram secondary start address offset register (dmaxstb) ? a 16-bit dma peripheral address register (dmaxpad) ? a 10-bit dma transfer count register (dmaxcnt) an additional pair of stat us registers, dmacs0 and dmacs1, are common to all dmac channels. figure 8-1: top level system architecture using a dedicated transaction bus cpu sram dma ram cpu peripheral ds bus peripheral 3 dma peripheral non-dma sram x-bus port 2 port 1 peripheral 1 dma ready peripheral 2 dma ready ready ready dma ds bus cpu cpu cpu peripheral indirect address note: for clarity, cpu and dma address buses are not shown. dma control dma controller dma channels 0123 dma dma dma
? 2009-2012 microchip technology inc. ds70591e-page 179 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 8-1: dmaxcon: dma channel x control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 chen size dir half nullw ? ? ? bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 ? ?amode<1:0> ? ? mode<1:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 chen: dma channel enable bit 1 = channel is enabled 0 = channel is disabled bit 14 size: data transfer size bit 1 = byte 0 = word bit 13 dir: transfer direction bit (source/destination bus select) 1 = reads from dma ram address; writes to peripheral address 0 = reads from peripheral address; writes to dma ram address bit 12 half: early block transfer comple te interrupt select bit 1 = initiates block transfer complete inte rrupt when half of the data has been moved 0 = initiates block transfer complete interrupt when all of the data has been moved bit 11 nullw: null data peripheral write mode select bit 1 = null data write to peripheral in addition to dma ram write (dir bit must also be clear) 0 = normal operation bit 10-6 unimplemented: read as ? 0 ? bit 5-4 amode<1:0>: dma channel operating mode select bits 11 = reserved 10 = peripheral indirect addressing mode 01 = register indirect without post-increment mode 00 = register indirect with post-increment mode bit 3-2 unimplemented: read as ? 0 ? bit 1-0 mode<1:0>: dma channel operating mode select bits 11 = one-shot, ping-pong modes are enabled (one block transfer from/to each dma ram buffer) 10 = continuous, ping-pong modes are enabled 01 = one-shot, ping-pong modes are disabled 00 = continuous, ping-pong modes are disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 180 ? 2009-2012 microchip technology inc. register 8-2: dmaxreq: dma channel x irq select register r/w-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 force ( 1 ) ? ? ? ? ? ? ? bit 15 bit 8 u-0 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 ? irqsel<6:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 force: force dma transfer bit ( 1 ) 1 = forces a single dma transfer (manual mode) 0 = automatic dma transfer initiation by dma request bit 14-7 unimplemented: read as ? 0 ? bit 6-0 irqsel<6:0>: dma peripheral irq number select bits ( 2 ) 0000000 - 1111111 = dmairq0-dmairq127 are se lected to be channel dmareq note 1: the force bit cannot be cleared by the user. the fo rce bit is cleared by hardware when the forced dma transfer is complete. 2: see table 8-1 for a complete listing of irq numbers for all interrupt sources. register 8-3: dmaxsta: dma channel x ram start address offset register a r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 sta<15:0>: primary dma ram start address bits (source or destination)
? 2009-2012 microchip technology inc. ds70591e-page 181 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 8-4: dmaxstb: dma channel x ram start address offset register b r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 stb<15:0>: secondary dma ram start address bits (source or destination) register 8-5: dmaxpad: dma channel x peripheral address register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pad<15:8> ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pad<7:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 pad<15:0>: peripheral address register bits ( 2 ) note 1: if the channel is enabled (i.e., active), writes to th is register may result in unpredictable behavior of the dma channel and should be avoided. 2: see table 8-1 for a complete list of peripheral addresses.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 182 ? 2009-2012 microchip technology inc. register 8-6: dmaxcnt: dma channel x transfer count register ( 1 ) u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 ? ? ? ? ? ? cnt<9:8> ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cnt<7:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-10 unimplemented: read as ? 0 ? bit 9-0 cnt<9:0>: dma transfer count register bits ( 2 ) note 1: if the channel is enabled (i.e., active), writes to th is register may result in unpredictable behavior of the dma channel and should be avoided. 2: number of dma transfers = cnt<9:0> + 1.
? 2009-2012 microchip technology inc. ds70591e-page 183 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 8-7: dmacs0: dma controller status register 0 u-0 u-0 u-0 u-0 r/c-0 r/c-0 r/c-0 r/c-0 ? ? ? ? pwcol3 pwcol2 pwcol1 pwcol0 bit 15 bit 8 u-0 u-0 u-0 u-0 r/c-0 r/c-0 r/c-0 r/c-0 ? ? ? ? xwcol3 xwcol2 xwcol1 xwcol0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11 pwcol3: channel 3 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 10 pwcol2: channel 2 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 9 pwcol1: channel 1 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 8 pwcol0: channel 0 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 7-4 unimplemented: read as ? 0 ? bit 3 xwcol3: channel 3 dma ram write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 2 xwcol2: channel 2 dma ram write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 1 xwcol1: channel 1 dma ram write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 0 xwcol0: channel 0 dma ram write collision flag bit 1 = write collision is detected 0 = no write collision is detected
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 184 ? 2009-2012 microchip technology inc. register 8-8: dmacs1: dma controller status register 1 u-0 u-0 u-0 u-0 r-1 r-1 r-1 r-1 ? ? ? ? lstch<3:0> bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 ? ? ? ? ppst3 ppst2 ppst1 ppst0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11-8 lstch<3:0>: last dma channel active bits 1111 = no dma transfer has occurred since system reset 1110 = reserved ? ? ? 0100 = reserved 0011 = last data transfer was by dma channel 3 0010 = last data transfer was by dma channel 2 0001 = last data transfer was by dma channel 1 0000 = last data transfer was by dma channel 0 bit 7-4 unimplemented: read as ? 0 ? bit 3 ppst3: channel 3 ping-pong mode status flag bit 1 = dma3stb register is selected 0 = dma3sta register is selected bit 2 ppst2: channel 2 ping-pong mode status flag bit 1 = dma2stb register is selected 0 = dma2sta register is selected bit 1 ppst1: channel 1 ping-pong mode status flag bit 1 = dma1stb register is selected 0 = dma1sta register is selected bit 0 ppst0: channel 0 ping-pong mode status flag bit 1 = dma0stb register is selected 0 = dma0sta register is selected
? 2009-2012 microchip technology inc. ds70591e-page 185 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 8-9: dsadr : most recent dma ram address r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<15:8> bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 dsadr<15:0>: most recent dma ram address accessed by dma controller bits
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 186 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 187 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 9.0 oscillator configuration the oscillator system provides: ? external and internal oscillator options as clock sources ? an on-chip phase-locked loop (pll) to scale the internal operating frequency to the required system clock frequency ? an internal frc oscillator that can also be used with the pll, thereby allo wing full-speed operation without any external clock generation hardware ? clock switching between various clock sources ? programmable clock postscaler for system power savings ? a fail-safe clock monito r (fscm) that detects clock failure and takes fail-safe measures ? a clock control register (osccon) ? nonvolatile configuration bits for main oscillator selection ? auxiliary pll for adc and pwm a simplified diagram of the oscillator system is shown in figure 9-1 . note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 42. ?oscillator (part iv)? (ds70307) in the ?dspic33f/ pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 188 ? 2009-2012 microchip technology inc. figure 9-1: oscillator system diagram n aclk selaclk apstsclr<2:0> to p w m / a d c (1) enapll asrcsel frcsel poscclk frcclk n rosel rodiv<3:0> refclko (3) poscclk reference clock generation auxiliary clock generation note 1: see section 9.1.3 ?pll configuration? and section 9.2 ?auxiliary clock generation? for configuration restrictions. 2: if the oscillator is used with xt or hs modes, an external parallel resistor with the value of 1 m ? must be connected. 3: refclko functionality is not availabl e if the primary oscillator is used. 4: the term, f p , refers to the clock source for all the peripherals, while f cy refers to the clock source for the cpu. throughout this document, f p and f cy are used interchangeably, except in the case of doze mode. f p and f cy will be different when doze mode is used in any ratio other than 1:1, which is the default. f vco (1) f osc secondary oscillator (sosc) lposcen sosco sosci timer 1 osc2 osc1 primary oscillator (posc) xtpll, hspll, xt, hs, ec frcdiv<2:0> wdt, pwrt, fscm frcdivn sosc frcdiv16 ecpll, frcpll nosc<2:0> fnosc<2:0> reset frc oscillator lprc oscillator doze<2:0> s3 s1 s2 s1/s3 s7 s6 frc lprc s0 s5 s4 16 clock switch s7 clock fail 2 tun<5:0> pll (1) f cy (4) f osc frcdiv doze f vco (1) to a d c a n d generator r (2) poscmd<1:0> poscclk f p (4) auxiliary clock apll (1) x16
? 2009-2012 microchip technology inc. ds70591e-page 189 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 9.1 cpu clocking system the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 devices provide six system clock options: ? fast rc (frc) oscillator ? frc oscillator with pll ? primary (xt, hs, or ec) oscillator ? primary oscillator with pll ? low-power rc (lprc) oscillator ? frc oscillator with postscaler ? secondary (lp) oscillator 9.1.1 system clock sources the fast rc (frc) internal oscillator runs at a nominal frequency of 7.37 mhz. user software can tune the frc frequency. user software can optionally specify a factor (ranging from 1:2 to 1:256) by which the frc clock frequency is divided. th is factor is selected using the frcdiv<2:0> (clkdiv<10:8>) bits. the primary oscillator can use one of the following as its clock source: ? xt (crystal): crystals a nd ceramic resonators in the range of 3 mhz to 10 mhz. the crystal is connected to the osc1 and osc2 pins ? hs (high-speed crystal): crystals in the range of 10 mhz to 50 mhz. the crystal is connected to the osc1 and osc2 pins ? ec (external clock): the external clock signal is directly applied to the osc1 pin the secondary (lp) oscillator is designed for low power and uses a 32.768 khz crystal or ceramic resonator. the lp oscillator uses the sosci and sosco pins. the lprc internal oscillator runs at a nominal frequency of 32.768 khz. it is also used as a reference clock by the watchdog timer (wdt) and fail-safe clock monitor (fscm). the clock signals generated by the frc and primary oscillators can be optionally applied to an on-chip phase-locked loop (pll) to provide a wide range of output frequencies for device operation. pll configuration is described in section 9.1.3 ?pll configuration? . the frc frequency depends on the frc accuracy (see table 27-20 ) and the value of the frc oscillator tuning register (see register 9-4 ). 9.1.2 system clock selection the oscillator source used at a device power-on reset event is selected using configuration bit settings. the oscillator configuration bit settings are located in the configuration registers in the program memory. (refer to section 24.1 ?configuration bits? for further details.) the initial oscillator selection con- figuration bits, fnosc<2: 0> (foscsel<2:0>), and the primary oscillat or mode select configuration bits, poscmd<1:0> (fosc<1:0>), select the oscillator source that is used at a power-on reset. the frc primary oscillator is the default (unprogrammed) selection. the configuration bits allow users to choose among 12 different clock modes, shown in table 9-1 . the output of the oscillator (or the ou tput of the pll if a pll mode has been selected), f osc , is divided by 2 to generate the device instruction clock (f cy ) and the peripheral clock time base (f p ). f cy defines the operating speed of the device and speeds up to 50 mips are supported by the device architecture. instruction execution speed or device operating frequency, f cy , is given by equation 9-1 . equation 9-1: device operating frequency table 9-1: configuration bi t values for clock selection f cy = f osc /2 oscillator mode oscillator source poscmd<1:0> fnosc <2:0> see notes fast rc oscillator with div ide-by-n (frcdivn) internal xx 111 1 , 2 fast rc oscillator with divide-by-16 (frcdiv16) internal xx 110 1 low-power rc oscillator (lprc) internal xx 101 1 secondary oscillator (sosc) secondary xx 100 ? primary oscillator (hs) with pll (hspll) primary 10 011 ? primary oscillator (xt) with pll (xtpll) primary 01 011 ? primary oscillator (ec) with pll (ecpll) primary 00 011 1 primary oscillator (hs) primary 10 010 ? primary oscillator (xt) primary 01 010 ? primary oscillator (ec) primary 00 010 1 fast rc oscillator with pll (frcpll) internal xx 001 1 fast rc oscillator (frc) internal xx 000 1 note 1: osc2 pin function is determined by the osciofnc configuration bit. 2: this is the default oscillator mode for an unprogrammed (erased) device.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 190 ? 2009-2012 microchip technology inc. 9.1.3 pll configuration the primary oscillator and internal frc oscillator can optionally use an on-chip pll to obtain higher speeds of operation. the pll provides significant flexibility in selecting the device operat ing speed. a block diagram of the pll is shown in figure 9-2 . the output of the primary oscillator or frc, denoted as ?f in ?, is divided down by a prescale factor (n1) of 2, 3, ... or 33 before being provided to the pll?s voltage controlled oscillator (vco). the input to the vco must be selected in the range of 0.8 mhz to 8 mhz. the prescale factor ?n1? is selected using the pllpre<4:0> bits (clkdiv<4:0>). the pll feedback divisor, selected using the plldiv<8:0> bits (pllfbd<8:0>), provides a factor, ?m?, by which the input to the vc o is multiplied. this factor must be selected such that the resulting vco output frequency is in the range of 100 mhz to 200 mhz. the vco output is further divided by a postscale factor, ?n2?. this factor is selected using the pllpost<1:0> bits (clkdiv<7:6>). ?n2? can be either 2, 4 or 8, and must be selected such that the pll output frequency (f osc ) is in the range of 12.5 mhz to 100 mhz, which generates device operating speeds of 6.25-50 mips. for a primary oscillator or frc oscillator, output ?f in ?, the pll output ?f osc ? is given by equation 9-2 . equation 9-2: f osc calculation for example, suppose a 10 mhz crystal is being used with the selected oscillator mode of xt with pll (see equation 9-3 ). ? if pllpre<4:0> = 0000 , then n1 = 2. this yields a vco input of 10/2 = 5 mhz, which is within the acceptable range of 0.8-8 mhz. ? if plldiv<8:0> = 0x26, then m = 40. this yields a vco output of 5 x 40 = 200 mhz, which is within the 100-200 mhz ranged needed. ? if pllpost<1:0> = 00 , then n2 = 2. this pro- vides a f osc of 200/2 = 100 mhz. the resultant device operating speed is 100/2 = 40 mips. equation 9-3: xt with pll mode example figure 9-2: pll block diagram ( ) m n1 * n2 f osc = f in * f cy = f osc 2 == 1 2 ( 10000000 * 40 2 * 2 ) 50 mips 0.8-8.0 mhz here (1) 100-200 mhz here (1) divide by 2, 4, 8 divide by 2-513 divide by 2-33 source (crystal, external clock pllpre x vco plldiv pllpost or internal rc) 12.5-100 mhz here (1,2) f osc note 1: this frequency range must be met at all times. 2: this frequency range is not supported for all devices. n1 m n2 f vco
? 2009-2012 microchip technology inc. ds70591e-page 191 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 9.2 auxiliary clock generation the auxiliary clock generation is used for a peripherals that need to operate at a frequency unrelated to the system clock such as a pwm or adc. the primary oscillator and internal frc oscillator sources can be used with an auxiliary pll to obtain the auxiliary clock. the auxiliary pll has a fixed 16x multiplication factor. the auxiliary clock has the following configuration restrictions: ? for proper pwm operation, auxiliary clock generation must be configured for 120 mhz (see parameter os56 in table 27-18 in section 27.0 ?electrical ch aracteristics? ). if a slower frequency is desired, the pwm input clock prescaler (divider) select bits (pclkdiv<2:0>) should be used. ? to achieve 1.04 ns pwm resolution, the auxiliary clock must use the 16x auxiliary pll (apll). all other clock sources will have a minimum pwm resolution of 8 ns. ? if the primary pll is used as a source for the aux- iliary clock, the primary pll should be configured up to a maximum operation of 30 mips or less. 9.3 reference clock generation the reference clock output logic provides the user with the ability to output a clock signal based on the system clock or the crystal oscillator on a device pin. the user application can specify a wide range of clock scaling prior to outputting the reference clock.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 192 ? 2009-2012 microchip technology inc. 9.4 oscillator control registers register 9-1: osccon: os cillator control register ( 1 ) u-0 r-y r-y r-y u-0 r/w-y r/w-y r/w-y ? cosc<2:0> ? nosc<2:0> ( 2 ) bit 15 bit 8 r/w-0 u-0 r-0 u-0 r/c-0 u-0 u-0 r/w-0 clklock ?lock ?cf ? ?oswen bit 7 bit 0 legend: c = clearable bit y = value set from configuration bits on por r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14-12 cosc<2:0>: current oscillator selection bits (read-only) 111 = fast rc oscillator (frc) with divide-by-n 110 = fast rc oscillator (frc) with divide-by-16 101 = low-power rc oscillator (lprc) 100 = secondary oscillator (sosc) 011 = primary oscillator (xt, hs, ec) with pll 010 = primary oscillator (xt, hs, ec) 001 = fast rc oscillator (frc) with pll 000 = fast rc oscillator (frc) bit 11 unimplemented: read as ? 0 ? bit 10-8 nosc<2:0>: new oscillator selection bits ( 2 ) 111 = fast rc oscillator (frc) with divide-by-n 110 = fast rc oscillator (frc) with divide-by-16 101 = low-power rc oscillator (lprc) 100 = secondary oscillator (sosc) 011 = primary oscillator (xt, hs, ec) with pll 010 = primary oscillator (xt, hs, ec) 001 = fast rc oscillator (frc) with pll 000 = fast rc oscillator (frc) bit 7 clklock: clock lock enable bit if clock switching is enabled and fscm is disabled (fcksm<1:0> (fosc<7:6>) = 0b01 ): 1 = clock switching is disabled, system clock source is locked 0 = clock switching is enabled, system clock s ource can be modified by clock switching bit 6 unimplemented: read as ? 0 ? bit 5 lock: pll lock status bit (read-only) 1 = indicates that pll is in lock or pll start-up timer is satisfied 0 = indicates that pll is out of lock, star t-up timer is in progress or pll is disabled bit 4 unimplemented: read as ? 0 ? note 1: writes to this register require an unlock sequence. refer to section 42. ?oscill ator (part iv)? (ds70307) in the ?dspic33f/pic24h family reference manual? for details. 2: direct clock switches between any primary oscillator mode with pll and frcpll mode are not permitted. this applies to clock switches in either direction. in these instances, the applic ation must switch to frc mode as a transition clock source between the two pll modes.
? 2009-2012 microchip technology inc. ds70591e-page 193 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 3 cf: clock fail detect bit (read/clear by application) 1 = fscm has detect ed clock failure 0 = fscm has not dete cted clock failure bit 2-1 unimplemented: read as ? 0 ? bit 0 oswen: oscillator switch enable bit 1 = requests oscillator switch to selection specified by nosc<2:0> bits 0 = oscillator switch is complete register 9-1: osccon: os cillator control register ( 1 ) (continued) note 1: writes to this register require an unlock sequence. refer to section 42. ?oscill ator (part iv)? (ds70307) in the ?dspic33f/pic24h family reference manual? for details. 2: direct clock switches between any primary oscillator mode with pll and frcpll mode are not permitted. this applies to clock switches in either direction. in these instances, the application must switch to frc mode as a transition clock source between the two pll modes.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 194 ? 2009-2012 microchip technology inc. register 9-2: clkdiv: clock divisor register r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 roi doze<2:0> dozen ( 1 ) frcdiv<2:0> bit 15 bit 8 r/w-0 r/w-1 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pllpost<1:0> ? pllpre<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 roi: recover on interrupt bit 1 = interrupts will clear the dozen bit and the proce ssor clock/peripheral clock ratio is set to 1:1 0 = interrupts have no effect on the dozen bit bit 14-12 doze<2:0>: processor clock reduction select bits 111 = f cy /128 110 = f cy /64 101 = f cy /32 100 = f cy /16 011 = f cy /8 (default) 010 = f cy /4 001 = f cy /2 000 = f cy /1 bit 11 dozen: doze mode enable bit ( 1 ) 1 = doze<2:0> field specifies the ratio between the peripheral clocks and the processor clocks 0 = processor clock/peripheral clock ratio forced to 1:1 bit 10-8 frcdiv<2:0>: internal fast rc osci llator postscaler bits 111 = frc divide-by-256 110 = frc divide-by-64 101 = frc divide-by-32 100 = frc divide-by-16 011 = frc divide-by-8 010 = frc divide-by-4 001 = frc divide-by-2 000 = frc divide-by-1 (default) bit 7-6 pllpost<1:0>: pll vco output divider select bits (also denoted as ?n2?, pll postscaler) 11 = output/8 10 = reserved 01 = output/4 (default) 00 = output/2 bit 5 unimplemented: read as ? 0 ? bit 4-0 pllpre<4:0>: pll phase detector input divider bits (also denoted as ?n1?, pll prescaler) 00000 = input/2 (default) 00001 = input/3 ? ? ? 11111 = input/33 note 1: this bit is cleared when the roi bi t is set and an interrupt occurs.
? 2009-2012 microchip technology inc. ds70591e-page 195 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 9-3: pllfbd: pll feedback divisor register u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 ? ? ? ? ? ? ? plldiv8 bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 plldiv<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-9 unimplemented: read as ? 0 ? bit 8-0 plldiv<8:0>: pll feedback divisor bits (also denoted as ?m?, pll multiplier) 000000000 = 2 000000001 = 3 000000010 = 4 ? ? ? 000110000 = 50 (default) ? ? ? 111111111 = 513
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 196 ? 2009-2012 microchip technology inc. register 9-4: osctun: oscillator tuning register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? tun<5:0> ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as ? 0 ? bit 5-0 tun<5:0>: frc oscillator tuning bits ( 1 ) 011111 = center frequency + 11.625% (8.23 mhz) 011110 = center frequency + 11.25% (8.20 mhz) ? ? ? 000001 = center frequency + 0.375% (7.40 mhz) 000000 = center frequency (7.37 mhz nominal) 111111 = center frequency ? 0.375% (7.345 mhz) ? ? ? 100001 = center frequency ? 11.625% (6.52 mhz) 100000 = center frequency ? 12% (6.49 mhz) note 1: osctun functionality has been provided to help cu stomers compensate for temperature effects on the frc frequency over a wide range of temperatures. the tu ning step-size is an approximation and is neither characterized nor tested.
? 2009-2012 microchip technology inc. ds70591e-page 197 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 9-5: aclkcon: auxiliary clock divisor control register r/w-0 r-0 r/w-1 u-0 u-0 r/w-1 r/w-1 r/w-1 enapll apllck selaclk ? ? apstsclr<2:0> bit 15 bit 0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 u-0 asrcsel frcsel ? ? ? ? ? ? bit 7 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 enapll: auxiliary pll enable bit 1 = apll is enabled 0 = apll is disabled bit 14 apllck: apll locked status bit (read-only) 1 = indicates that auxiliary pll is in lock 0 = indicates that auxiliary pll is not in lock bit 13 selaclk: select auxiliary clock source for auxiliary clock divider bit 1 = auxiliary oscillators provide the sour ce clock for the auxiliary clock divider 0 = primary pll (f vco ) provides the source clock for the auxiliary clock divider bit 12-11 unimplemented: read as ? 0 ? bit 10-8 apstsclr<2:0>: auxiliary clock output divider bits 111 = divided by 1 110 = divided by 2 101 = divided by 4 100 = divided by 8 011 = divided by 16 010 = divided by 32 001 = divided by 64 000 = divided by 256 bit 7 asrcsel: select reference clock sour ce for auxiliary clock bit 1 = primary oscillator is the clock source 0 = no clock input is selected bit 6 frcsel: select reference clock source for auxiliary pll bit 1 = selects frc clock for auxiliary pll 0 = input clock source is determined by asrcsel bit setting bit 5-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 198 ? 2009-2012 microchip technology inc. register 9-6: refocon: reference oscillator control register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 roon ? rosslp rosel rodiv<3:0> ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 roon: reference oscillator output enable bit 1 = reference oscillator output is enabled on refclk0 pin 0 = reference oscillator output is disabled bit 14 unimplemented: read as ? 0 ? bit 13 rosslp: reference oscillator run in sleep bit 1 = reference oscillator output continues to run in sleep 0 = reference oscillator output is disabled in sleep bit 12 rosel: reference oscillator source select bit 1 = oscillator crystal used as the reference clock 0 = system clock used as the reference clock bit 11-8 rodiv<3:0>: reference oscillator divider bits ( 1 ) 1111 = reference clock divided by 32,768 1110 = reference clock divided by 16,384 1101 = reference clock divided by 8,192 1100 = reference clock divided by 4,096 1011 = reference clock divided by 2,048 1010 = reference clock divided by 1,024 1001 = reference clock divided by 512 1000 = reference clock divided by 256 0111 = reference clock divided by 128 0110 = reference clock divided by 64 0101 = reference clock divided by 32 0100 = reference clock divided by 16 0011 = reference clock divided by 8 0010 = reference clock divided by 4 0001 = reference clock divided by 2 0000 = reference clock bit 7-0 unimplemented: read as ? 0 ? note 1: the reference oscillator output must be disabled (roon = 0 ) before writing to these bits.
? 2009-2012 microchip technology inc. ds70591e-page 199 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 9.5 clock switching operation applications are free to s witch among any of the four clock sources (primary, lp, frc and lprc) under software control at any time . to limit the possible side effects of this flexibility, dspic33fj32gs406/606/608/ 610 and dspic33fj64gs406/606/608/610 devices have a safeguard lock built into the switch process. 9.5.1 enabling clock switching to enable clock switching, the fcksm1 configuration bit in the configuration register must be programmed to ? 0 ?. (refer to section 24.1 ?configuration bits? for further details.) if the fcksm1 configuration bit is unprogrammed (? 1 ?), the clock switching function and fail-safe clock monitor function are disabled. this is the default setting. the nosc control bits (osccon<10:8>) do not control the clock selecti on when clock switching is disabled. however, the cosc bits (osccon<14:12>) reflect the clock source selected by the fnosc configuration bits. the oswen control bit (osccon<0>) has no effect when clock switching is disabled. it is held at ? 0 ? at all times. 9.5.2 oscillator switching sequence to perform a clock switch, the following basic sequence is required: 1. if desired, read the coscx bits (osccon<14:12>) to determine the current oscillator source. 2. perform the unlock sequenc e to allow a write to the osccon register high byte. 3. write the appropriate value to the noscx control bits (osccon<10:8>) for the new oscillator source. 4. perform the unlock sequenc e to allow a write to the osccon register low byte. 5. set the oswen bit (osccon<0>) to initiate the oscillator switch. once the basic sequence is completed, the system clock hardware responds automatically as follows: 1. the clock switching hardware compares the coscx status bits with the new value of the noscx control bits. if they are the same, the clock switch is a redundant operation. in this case, the oswen bit is cleared automatically and the clock switch is aborted. 2. if a valid clock switch has been initiated, the lock (osccon<5>) and the cf (osccon<3>) status bits are cleared. 3. the new oscillator is tu rned on by the hardware if it is not currently runnin g. if a crystal oscillator must be turned on, the hardware waits until the oscillator start-up timer (ost) expires. if the new source is using the pll, the hardware waits until a pll lock is detected (lock = 1 ). 4. the hardware waits for 10 clock cycles from the new clock source and then performs the clock switch. 5. the hardware clears the oswen bit to indicate a successful clock transition. in addition, the noscx bit values are transferred to the coscx status bits. 6. the old clock source is turned off at this time, with the exception of lprc (if wdt or fscm are enabled) or lp (if lposcen remains set). 9.6 fail-safe clock monitor (fscm) the fail-safe clock monitor (fscm) allows the device to continue to operate even in the event of an oscillator failure. the fscm function is enabled by programming. if the fscm function is enabled, the lprc internal oscillator runs at all times (except during sleep mode) and is not subject to control by the watchdog timer. in the event of an oscillator failure, the fscm generates a clock failure tr ap event and switches the system clock over to the frc oscillator. then, the application program can either attempt to restart the oscillator or execute a controlled shutdown. the trap can be treated as a warm reset by simply loading the reset address into the os cillator fail trap vector. if the pll multiplier is us ed to scale the system clock, the internal frc is also multiplied by the same factor on clock failure. es sentially, the device switches to frc with pll on a clock failure. note: primary oscillator mode has three different submodes (xt, hs and ec), which are determined by the poscmd<1:0> config- uration bits. while an application can switch to and from primary oscillator mode in software, it cannot switch among the different primary submodes without reprogramming the device. note 1: the processor continues to execute code throughout the clock switching sequence. timing-sensitive code should not be executed during this time. 2: direct clock switc hes between any pri- mary oscillator mode with pll and frcpll mode are not permitted. this applies to clock switches in either direc- tion. in these instances, the application must switch to frc mode as a transition clock source between the two pll modes. 3: refer to section 42. ?oscillator (part iv)? (ds70307) in the ?dspic33f/pic24h family reference manual? for details.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 200 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 201 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 10.0 power-saving features the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 devices provide the ability to manage power consumption by selectively managing clocking to the cpu and the peripherals. in general, a lower clock frequency and a reduction in the number of circuits being clocked constitutes lower consumed power. devices can manage power consumption in four different ways: ? clock frequency ? instruction-based sleep and idle modes ? software controlled doze mode ? selective peripheral control in software combinations of these methods can be used to selectively tailor an application?s power consumption while still maintaining critical application features, such as timing-sensitive communications. 10.1 clock frequency and clock switching the devices allow a wide range of clock frequencies to be selected under applicatio n control. if the system clock configuration is not locked, users can choose low-power or high-precision oscillators by simply changing the noscx bits (osccon<10:8>). the process of changing a syst em clock during operation, as well as limitations to the process, are discussed in more detail in section 9.0 ?oscillator configuration? . 10.2 instruction-based power-saving modes the devices have two special power-saving modes that are entered through the execution of a special pwrsav instruction. sleep mode stops clock operation and halts all code execution. idle mode halts the cpu and code execution, but allows peri pheral modules to continue operation. the assembler syntax of the pwrsav instruction is shown in example 10-1 . sleep and idle modes can be exited as a result of an enabled interrupt, wdt time-out or a device reset. when the device exits these modes, it is said to wake-up. 10.2.1 sleep mode the following occurs in sleep mode: ? the system clock source is shut down. if an on-chip oscillator is used, it is turned off. ? the device current consumption is reduced to a minimum, provided that no i/o pin is sourcing current. ? the fail-safe clock monitor does not operate, since the system clock source is disabled. ? the lprc clock continues to run in sleep mode if the wdt is enabled. ? the wdt, if enabled, is automatically cleared prior to entering sleep mode. ? some device features or peripherals may continue to operate. this includes the items such as the input change notification on the i/o ports or peripherals that use an external clock input. ? any peripheral that r equires the system clock source for its operation is disabled. the device will wake-up from sleep mode on any of these events: ? any interrupt source that is individually enabled ? any form of device reset ? a wdt time-out on wake-up from sleep mode, the processor restarts with the same clock source th at was active when sleep mode was entered. example 10-1: pwrsav instruction syntax note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 9. ?watchdog timer and power-saving modes? (ds70196) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. note: sleep_mode and idle_mode are constants defined in the assembler include file for the selected device. pwrsav #sleep_mode ; put the device into sleep mode pwrsav #idle_mode ; put the device into idle mode
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 202 ? 2009-2012 microchip technology inc. 10.2.2 idle mode the following occur in idle mode: ? the cpu stops executing instructions. ? the wdt is automatically cleared. ? the system clock sour ce remains active. by default, all peripheral modules continue to operate normally from the system clock source, but can also be selectively disabled (see section 10.5 ?peripheral module disable? ). ? if the wdt or fscm is enabled, the lprc also remains active. the device will wake-up from idle mode on any of these events: ? any interrupt that is individually enabled ? any device reset ? a wdt time-out on wake-up from idle mode, the clock is reapplied to the cpu and instruction execution will begin (2-4 clock cycles later), starting with the instruction following the pwrsav instruction, or the first instruction in the isr. 10.2.3 interrupts coincident with power save instructions any interrupt that coincides with the execution of a pwrsav instruction is held off until entry into sleep or idle mode has completed. the device then wakes up from sleep or idle mode. 10.3 doze mode the preferred strategies for reducing power consumption are changing cl ock speed and invoking one of the power-saving modes. in some circumstances, this may not be practical. for example, it may be neces- sary for an application to maintain uninterrupted synchronous communication, even while it is doing noth- ing else. reducing system clock speed can introduce communication errors, while using a power-saving mode can stop communications completely. doze mode is a simple and effective alternative method to reduce power consumption while the device is still executing code. in this mode, the system clock continues to operate from th e same source and at the same speed. peripheral modules continue to be clocked at the same speed, while the cpu clock speed is reduced. synchronization between the two clock domains is maintained, allowing the peripherals to access the sfrs while the cpu executes code at a slower rate. doze mode is enabled by setting the dozen bit (clkdiv<11>). the ratio between peripheral and core clock speed is determined by the doze<2:0> bits (clkdiv<14:12>). there are eight possible configura- tions, from 1:1 to 1:128, with 1:1 being the default setting. programs can use doze mode to selectively reduce power consumption in event-driven applications. this allows clock-sensitive func tions, such as synchronous communications, to continue without interruption while the cpu idles, waiting for something to invoke an interrupt routine. an automatic return to full-speed cpu operation on interrupts can be enabled by setting the roi bit (clkdiv<15>). by default, interrupt events have no effect on doze mode operation. for example, suppose the device is operating at 20 mips and the can module has been configured for 500 kbps based on this device operating speed. if the device is placed in doze mode with a clock frequency ratio of 1:4, the can module continues to communicate at the required bit rate of 500 kbps, but the cpu now starts executing instructions at a frequency of 5 mips. 10.4 pwm power-saving features typically, many applications need either a high- resolution duty cycle or ph ase offset (for fixed frequency operation) or a high-resolution pwm period for variable frequency modes of operation (such as resonant mode). very few a pplications require both high-resolution modes simultaneously. the hrpdis and the hrddis bits in the auxconx registers permit the user to disable the circuitry associ- ated with the high-resolution duty cycle and pwm period to reduce the operating current of the device. if the hrddis bit is set, t he circuitry associated with the high-resolution duty cycle, phase offset, and dead time for the respective pwm generator is disabled. if the hrpdis bit is set, the circuitry associated with the high-resolution pwm period for the respective pwm generator is disabled. when the hrpdis bit is set, the smallest unit of measure for the pwm period is 8.32 ns. if the hrddis bit is set, th e smallest unit of measure for the pwm duty cycle, phase offset and dead time is 8.32 ns.
? 2009-2012 microchip technology inc. ds70591e-page 203 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 10.5 peripheral module disable the peripheral module disable (pmd) registers provide a method to disable a peripheral module by stopping all clock sources supplied to that module. when a peripheral is disabl ed using the appropriate pmd control bit, the peripheral is in a minimum power consumption state. the control and status registers associated with the peripheral are also disabled, so writes to those registers will have no effect and read values will be invalid. a peripheral module is enabled only if both the associated bit in the pmd register is cleared and the peripheral is supported by the specific dspic ? dsc variant. if the peripheral is present in the device, it is enabled in the pmd register by default. note: if a pmd bit is set, the corresponding module is disabled after a delay of one instruction cycle. simila rly, if a pmd bit is cleared, the corresponding module is enabled after a delay of one instruction cycle (assuming the m odule control regis- ters are already configured to enable module operation).
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 204 ? 2009-2012 microchip technology inc. register 10-1: pmd1: peripheral module disable control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 t5md t4md t3md t2md t1md qei1md pwmmd ( 1 ) ? bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 i2c1md u2md u1md spi2md spi1md ? c1md adcmd bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 t5md: timer5 module disable bit 1 = timer5 module is disabled 0 = timer5 module is enabled bit 14 t4md: timer4 module disable bit 1 = timer4 module is disabled 0 = timer4 module is enabled bit 13 t3md: timer3 module disable bit 1 = timer3 module is disabled 0 = timer3 module is enabled bit 12 t2md: timer2 module disable bit 1 = timer2 module is disabled 0 = timer2 module is enabled bit 11 t1md: timer1 module disable bit 1 = timer1 module is disabled 0 = timer1 module is enabled bit 10 qei1md: qei1 module disable bit 1 = qei1 module is disabled 0 = qei1 module is enabled bit 9 pwmmd: pwm module disable bit ( 1 ) 1 = pwm module is disabled 0 = pwm module is enabled bit 8 unimplemented: read as ? 0 ? bit 7 i2c1md: i2c1 module disable bit 1 = i2c1 module is disabled 0 = i2c1 module is enabled bit 6 u2md: uart2 module disable bit 1 = uart2 module is disabled 0 = uart2 module is enabled bit 5 u1md: uart1 module disable bit 1 = uart1 module is disabled 0 = uart1 module is enabled bit 4 spi2md: spi2 module disable bit 1 = spi2 module is disabled 0 = spi2 module is enabled note 1: once the pwm module is re- enabled (pwmmd is set to ? 1 ? and then set to ? 0 ?), all pwm registers must be re-initialized.
? 2009-2012 microchip technology inc. ds70591e-page 205 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 3 spi1md: spi1 module disable bit 1 = spi1 module is disabled 0 = spi1 module is enabled bit 2 unimplemented: read as ? 0 ? bit 1 c1md: ecan1 module disable bit 1 = ecan1 module is disabled 0 = ecan1 module is enabled bit 0 adcmd: adc module disable bit 1 = adc module is disabled 0 = adc module is enabled register 10-1: pmd1: peripheral module disable control register 1 (continued) note 1: once the pwm module is re- enabled (pwmmd is set to ? 1 ? and then set to ? 0 ?), all pwm registers must be re-initialized.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 206 ? 2009-2012 microchip technology inc. register 10-2: pmd2: peripheral module disable control register 2 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? ? ic4md ic3md ic2md ic1md bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? ? oc4md oc3md oc2md oc1md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11 ic4md: input capture 4 module disable bit 1 = input capture 4 module is disabled 0 = input capture 4 module is enabled bit 19 ic3md: input capture 3 module disable bit 1 = input capture 3 module is disabled 0 = input capture 3 module is enabled bit 9 ic2md: input capture 2 module disable bit 1 = input capture 2 module is disabled 0 = input capture 2 module is enabled bit 8 ic1md: input capture 1 module disable bit 1 = input capture 1 module is disabled 0 = input capture 1 module is enabled bit 7-4 unimplemented: read as ? 0 ? bit 3 oc4md: output compare 4 module disable bit 1 = output compare 4 module is disabled 0 = output compare 4 module is enabled bit 2 oc3md: output compare 3 module disable bit 1 = output compare 3 module is disabled 0 = output compare 3 module is enabled bit 1 oc2md: output compare 2 module disable bit 1 = output compare 2 module is disabled 0 = output compare 2 module is enabled bit 0 oc1md: output compare 1 module disable bit 1 = output compare 1 module is disabled 0 = output compare 1 module is enabled
? 2009-2012 microchip technology inc. ds70591e-page 207 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 10-3: pmd3: peripheral module disable control register 3 register 10-4: pmd4: peripheral module disable control register 4 u-0 u-0 u-0 u-0 u-0 r/w-0 u-0 u-0 ? ? ? ? ? cmpmd ? ? bit 15 bit 8 u-0 u-0 r/w-0 u-0 u-0 u-0 r/w-0 u-0 ? ?qei2md ? ? ? i2c2md ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10 cmpmd: analog comparator module disable bit 1 = analog comparator module is disabled 0 = analog comparator module is enabled bit 9-6 unimplemented: read as ? 0 ? bit 5 qei2md: qei2 module disable bit 1 = qei2 module is disabled 0 = qei2 module is enabled bit 4-2 unimplemented: read as ? 0 ? bit 1 i2c2md: i2c2 module disable bit 1 = i2c2 module is disabled 0 = i2c2 module is enabled bit 0 unimplemented: read as ? 0 ? u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-0 u-0 u-0 u-0 ? ? ? ?refomd ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as ? 0 ? bit 3 refomd: reference clock generator module disable bit 1 = reference clock generator module is disabled 0 = reference clock generator module is enabled bit 2-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 208 ? 2009-2012 microchip technology inc. register 10-5: pmd6: peripheral module disable control register 6 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pwm8md pwm7md pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 pwm8md: pwm generator 8 module disable bit 1 = pwm generator 8 module is disabled 0 = pwm generator 8 module is enabled bit 14 pwm7md: pwm generator 7 module disable bit 1 = pwm generator 7 module is disabled 0 = pwm generator 7 module is enabled bit 13 pwm6md: pwm generator 6 module disable bit 1 = pwm generator 6 module is disabled 0 = pwm generator 6 module is enabled bit 12 pwm5md: pwm generator 5 module disable bit 1 = pwm generator 5 module is disabled 0 = pwm generator 5 module is enabled bit 11 pwm4md: pwm generator 4 module disable bit 1 = pwm generator 4 module is disabled 0 = pwm generator 4 module is enabled bit 10 pwm3md: pwm generator 3 module disable bit 1 = pwm generator 3 module is disabled 0 = pwm generator 3 module is enabled bit 9 pwm2md: pwm generator 2 module disable bit 1 = pwm generator 2 module is disabled 0 = pwm generator 2 module is enabled bit 8 pwm1md: pwm generator 1 module disable bit 1 = pwm generator 1 module is disabled 0 = pwm generator 1 module is enabled bit 7-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 209 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 10-6: pmd7: peripheral module disable control register 7 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? ? cmp4md cmp3md cmp2md cmp1md bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 ? ? ? ? ? ? ?pwm9md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11 cmp4md: analog comparator 4 module disable bit 1 = analog comparator 4 module is disabled 0 = analog comparator 4 module is enabled bit 10 cmp3md: analog comparator 3 module disable bit 1 = analog comparator 3 module is disabled 0 = analog comparator 3 module is enabled bit 9 cmp2md: analog comparator 2 module disable bit 1 = analog comparator 2 module is disabled 0 = analog comparator 2 module is enabled bit 8 cmp1md: analog comparator 1 module disable bit 1 = analog comparator 1 module is disabled 0 = analog comparator 1 module is enabled bit 7-1 unimplemented: read as ? 0 ? bit 0 pwm9md: pwm generator 9 module disable bit 1 = pwm generator 9 module is disabled 0 = pwm generator 9 module is enabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 210 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 211 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 11.0 i/o ports all of the device pins (except v dd , v ss , mclr and osc1/clki) are shared am ong the peripherals and the parallel i/o ports. all i/o input ports feature schmitt trigger inputs for improved noise immunity. 11.1 parallel i/o (pio) ports generally a parallel i/o port that shares a pin with a peripheral is subservient to the peripheral. the peripheral?s output buffer data and control signals are provided to a pair of multiplexers. the multiplexers select whether the peripher al or the associated port has ownership of the output data and control signals of the i/o pin. the logic also prevents ?loop through?, in which a port?s digital output can drive the input of a peripheral that shares the same pin. figure 11-1 shows how ports are shared with other peripherals and the associated i/o pin to which they are connected. when a peripheral is enabled and the peripheral is actively driving an associated pin, the use of the pin as a general purpose output pin is disabled. the i/o pin can be read, but the output driver for the parallel port bit is disabled. if a peripheral is enabled, but the peripheral is not actively driving a pin, that pin can be driven by a port. all port pins have three registers directly associated with their operation as digita l i/o. the data direction register (trisx) determines whether the pin is an input or an output. if the data direction bit is ? 1 ?, then the pin is an input. all port pins are defined as inputs after a reset. reads from the latch (latx) read the latch. writes to the latch write t he latch. reads from the port (portx) read the port pins, while writes to the port pins write the latch. any bit and its associated data and control registers that are not valid for a particular device will be disabled. that means the corresponding latx and trisx registers and the port pin will read as zeros. when a pin is shared wit h another peripheral or function that is defined as an input only, it is nevertheless regarded as a dedicated port because there is no other compet ing source of outputs. note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 10. ?i/o ports? (ds70193) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 212 ? 2009-2012 microchip technology inc. figure 11-1: block diagram of a typical shared port structure q d ck wr lat + tris latch i/o pin wr port data bus q d ck data latch read port read tris 1 0 1 0 wr tris peripheral output data output enable peripheral input data i/o peripheral module peripheral output enable pio module output multiplexers output data input data peripheral module enable read lat
? 2009-2012 microchip technology inc. ds70591e-page 213 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 11.2 open-drain configuration in addition to the port, lat and tris registers for data control, some digital-only port pins can also be individually configured for either digital or open-drain output. this is controlled by the open-drain control register, odcx, associated with each port. setting any of the bits configures the corresponding pin to act as an open-drain output. the open-drain feature a llows the generation of outputs higher than v dd (for example, 5v) on any desired 5v tolerant pins by using external pull-up resistors. the maximum open-drain voltage allowed is the same as the maximum v ih specification. refer to ? pin diagrams ? for the available pins and their functionality. 11.3 configuring analog port pins the adpcfg and tris regist ers control the operation of the analog-to-digital port pins. the port pins that are to function as analog inputs must have their corre- sponding tris bit set (input). if the tris bit is cleared (output), the digi tal output level (v oh or v ol ) will be converted. the adpcfg and adpcfg2 registers have a default value of 0x000; therefore, all pins that share anx functions are analog (not digital) by default. when the port register is read, all pins configured as analog input channels will read as cleared (a low level). pins configured as digital inputs will not convert an analog input. analog levels on any pin defined as a digital input (including the anx pins) can cause the input buffer to consume current that exceeds the device specifications. 11.4 i/o port write/read timing one instruction cycle is requ ired between a port direction change or port write operation and a read operation of the same port. typically, this instruction would be a nop . an example is shown in example 11-1 . 11.5 input change notification the input change notification function of the i/o ports allows the dspi c33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices to gen- erate interrupt requests to the processor in response to a change-of-state (cos) on selected input pins. this feature can detect input change-of-states even in sleep mode, when the clocks are disabled. depending on the device pin count, up to 30 external signals (cnx pin) can be selected (enabled) for generating an interrupt request on a change-of-state. four control registers ar e associated with the cn module. the cnen1 and cnen2 registers contain the interrupt enable control bits for each of the cn input pins. setting any of these bits enables a cn interrupt for the corresponding pins. each cn pin also has a weak pull-up connected to it. the pull-ups act as a current source connected to the pin, and eliminate the need for external resistors when the push button or keypad devices are connected. the pull-ups are enabled separately using the cnpu1 and cnpu2 registers, which contain the control bits for each of the cn pins. setting any of the control bits enables the weak pull-ups for the corresponding pins. equation 11-1: port write/read example note: pull-ups on change notification pins should always be disabled when the port pin is configured as a digital output. mov 0xff00, w0 ; configure portb<15:8> as inputs mov w0, trisbb ; and portb<7:0> as outputs nop ; delay 1 cycle btss portb, #13 ; next instruction
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 214 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 215 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 12.0 timer1 the timer1 module is a 16- bit timer, which can serve as a time counter for the real-time clock (rtc), or operate as a free-running interval timer/counter. the timer1 module has the following unique features over other timers: ? can be operated from the low-power 32.767 khz crystal oscillator available on the device ? can be operated in asynchronous counter mode from an external clock source. ? the external clock input (t1ck) can optionally be synchronized to the internal device clock and the clock synchronization is performed after the prescaler. the unique features of timer1 allow it to be used for real-time clock (rtc) applications. a block diagram of timer1 is shown in figure 12-1 . the timer1 module can operate in one of the following modes: ? timer mode ? gated timer mode ? synchronous counter mode ? asynchronous counter mode in timer and gated timer modes, the input clock is derived from the internal instruction cycle clock (f cy ). in synchronous and asynchronous counter modes, the input clock is derived from the external clock input at the t1ck pin. the timer modes are determined by the following bits: ? timer clock source control bit: tcs (t1con<1>) ? timer synchronization control bit: tsync (t1con<2>) ? timer gate control bit: tgate (t1con<6>) the timer control bit settings for different operating modes are given in the table 12-1 . table 12-1: timer mode settings figure 12-1: 16-bit timer1 module block diagram note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 11. ?timers? (ds70205) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. mode tcs tgate tsync timer 00x gated timer 01x synchronous counter 1x1 asynchronous counter 1x0 tgate tcs 00 10 x1 comparator pr1 tgate set t1if flag 0 1 tsync 1 0 sync equal reset t1ck prescaler (/n) tckps<1:0> gate sync f cy falling edge detect prescaler (/n) tckps<1:0> tmr1
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 216 ? 2009-2012 microchip technology inc. register 12-1: t1con: timer1 control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton ?tsidl ? ? ? ? ? bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 u-0 ? tgate tckps<1:0> ?tsynctcs ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 ton: timer1 on bit 1 = starts 16-bit timer1 0 = stops 16-bit timer1 bit 14 unimplemented: read as ? 0 ? bit 13 tsidl: timer1 stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-7 unimplemented: read as ? 0 ? bit 6 tgate: timer1 gated time accumulation enable bit when t c s = 1 : this bit is ignored. when t c s = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timer1 input clock prescale select bits 11 = 1:256 10 = 1:64 01 = 1:8 00 = 1:1 bit 3 unimplemented: read as ? 0 ? bit 2 tsync: timer1 external clock input synchronization select bit when tcs = 1 : 1 = synchronizes external clock input 0 = does not synchronize external clock input when tcs = 0 : this bit is ignored. bit 1 tcs: timer1 clock source select bit 1 = external clock from t1ck pin (on the rising edge) 0 = internal clock (f cy ) bit 0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 217 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 13.0 timer2/3/4/5 features timer2 and timer4 are type b timers that offer the following major features: ? a type b timer can be concatenated with a type c timer to form a 32-bit timer ? external clock input (txck) is always synchronized to the internal device clock and the clock synchronization is performed after the prescaler figure 13-1 shows a block diagram of the type b timer. timer3 and timer5 are type c timers that offer the following major features: ? a type c timer can be concatenated with a type b timer to form a 32-bit timer ? at least one type c timer has the ability to trigger an analog-to-digital conversion ? external clock input (txck) is always synchronized to the internal devi ce clock and the clock synchronization is performed before the prescaler a block diagram of the type c timer is shown in figure 13-2 . figure 13-1: type b timer bl ock diagram (x = 2, 4) figure 13-2: type c timer block diagram (x = 3, 5) note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 11. ?timers? (ds70205) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. note: timer3 is not available on all devices. prescaler (/n) tgate tcs 00 10 x1 tmrx comparator tgate set txif flag 0 1 sync tckps<1:0> equal reset txck f cy prescaler (/n) tckps<1:0> falling edge detect gate sync prx tgate tcs 00 10 x1 comparator f cy tgate set txif flag 0 1 tckps<1:0> equal reset txck adc soc trigger prescaler (/n) tckps<1:0> sync prescaler (/n) prx tmrx gate sync falling edge detect
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 218 ? 2009-2012 microchip technology inc. the timer2/3/4/5 modules can operate in one of the following modes: ? timer mode ? gated timer mode ? synchronous counter mode in timer and gated timer modes, the input clock is derived from the internal instruction cycle clock (f cy ). in synchronous counter mode, the input clock is derived from the external cl ock input at the txck pin. the timer modes are determined by the following bits: ? tcs (txcon<1>): timer clock source control bit ? tgate (txcon<6>): timer gate control bit timer control bit settings for different operating modes are given in the table 13-1 . table 13-1: timer mode settings 13.1 16-bit operation to configure any of the timers for individual 16-bit operation: 1. clear the t32 bit corresponding to that timer. 2. select the timer prescaler ratio using the tckps<1:0> bits. 3. set the clock and gating modes using the tcs and tgate bits. 4. load the timer period value into the prx register. 5. if interrupts are required, set the interrupt enable bit, txie. use the priority bits, txip<2:0>, to set the interrupt priority. 6. set the ton bit. 13.2 32-bit operation a 32-bit timer module can be formed by combining a type b and a type c 16-bit timer module. for 32-bit timer operation, the t32 control bit in the type b timer control (txcon<3>) register must be set. the type c timer holds the most significant word (msw) and the type b timer holds the least significant word (lsw) for 32-bit operation. when configured for 32-bit operation, only the type b timerx control (txcon) register bits are required for setup and control while the type c timer control register bits are ignored (except the tsidl bit). for interrupt control, the combined 32-bit timer uses the interrupt enable, interrupt flag and interrupt priority control bits of the type c timer. the interrupt control and status bits for the type b timer are ignored during 32-bit timer operation. the timers that can be combined to form a 32-bit timer are listed in table 13-2 . table 13-2: 32-bit timer a block diagram representation of the 32-bit timer module is shown in figure 13-3 . the 32-timer module can operate in one of the following modes: ? timer mode ? gated timer mode ? synchronous counter mode to configure the timer features for 32-bit operation: 1. set the t32 control bit. 2. select the prescaler ratio for timer2 using the tckps<1:0> bits. 3. set the clock and gating modes using the corresponding tcs and tgate bits. 4. load the timer period value. pr3 contains the most significant word of the value, while pr2 contains the least significant word. 5. if interrupts are required, set the interrupt enable bit, t3ie. use the priority bits, t3ip<2:0>, to set the interrupt priority. while timer2 controls the timer, the interrupt appears as a timer3 interrupt. 6. set the corresponding ton bit. mode tcs tgate timer 00 gated timer 01 synchronous counter 1x type b timer (lsw) type c timer (msw) timer2 timer3 timer4 timer5
? 2009-2012 microchip technology inc. ds70591e-page 219 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 13-3: 32-bit timer block diagram prescaler (/n) tgate tcs 00 10 x1 tmrx (1) prx tgate set tyif 0 1 tckps<1:0> equal txck f cy falling edge detect prescaler (/n) tckps<1:0> tmry (2) comparator pry reset msw lsw tmryhld data bus <15:0> flag note 1: timerx is a type b timer (x = 2, 4). 2: timery is a type c timer (y = 3, 5). gate sync sync
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 220 ? 2009-2012 microchip technology inc. register 13-1: txcon: timerx control register (x = 2, 4) r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton ?tsidl ? ? ? ? ? bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 u-0 ? tgate tckps<1:0> t32 ?tcs ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 ton: timerx on bit when t32 = 1 (in 32-bit timer mode): 1 = starts 32-bit tmrx:tmry timer pair 0 = stops 32-bit tmrx:tmry timer pair when t32 = 0 (in 16-bit timer mode): 1 = starts 16-bit timer 0 = stops 16-bit timer bit 14 unimplemented: read as ? 0 ? bit 13 tsidl: timerx stop in idle mode bit 1 = discontinues timer operation when device enters idle mode 0 = continues timer operation in idle mode bit 12-7 unimplemented: read as ? 0 ? bit 6 tgate: timerx gated time accumulation enable bit when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timerx input clock prescale select bits 11 = 1:256 prescale value 10 = 1:64 prescale value 01 = 1:8 prescale value 00 = 1:1 prescale value bit 3 t32: 32-bit timerx mode select bit 1 = tmrx and tmry form a 32-bit timer 0 = tmrx and tmry form a separate 16-bit timer bit 2 unimplemented: read as ? 0 ? bit 1 tcs: timerx clock source select bit 1 = external clock from txck pin 0 = internal clock (f osc /2) bit 0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 221 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 13-2: tycon: timery control register (y = 3, 5) r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton ( 2 ) ?tsidl ( 1 ) ? ? ? ? ? bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 u-0 ? tgate ( 2 ) tckps<1:0> ( 2 ) ? ?tcs ( 2 ) ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 ton: timery on bit ( 2 ) 1 = starts 16-bit timer y 0 = stops 16-bit timer y bit 14 unimplemented: read as ? 0 ? bit 13 tsidl: timery stop in idle mode bit ( 1 ) 1 = discontinues timer operation when device enters idle mode 0 = continue timers operation in idle mode bit 12-7 unimplemented: read as ? 0 ? bit 6 tgate: timer y gated time accumulation enable bit ( 2 ) when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timer y input clock prescale select bits ( 2 ) 11 = 1:256 prescale value 10 = 1:64 prescale value 01 = 1:8 prescale value 00 = 1:1 prescale value bit 3-2 unimplemented: read as ? 0 ? bit 1 tcs: timer y clock source select bit ( 2 ) 1 = external clock from txck pin 0 = internal clock (f osc /2) bit 0 unimplemented: read as ? 0 ? note 1: when 32-bit timer operation is enabled (t32 = 1 ) in the timer control regist er (txcon<3>), the tsidl bit must be cleared to operate th e 32-bit timer in idle mode. 2: when the 32-bit timer operation is enabled (t32 = 1 ) in the timer control (txcon<3>) register, these bits have no effect.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 222 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 223 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 14.0 input capture the input capture module is useful in applications requiring frequency (period) and pulse measurement. the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 devices support up to two input capture channels. the input capture module captures the 16-bit value of the selected time base register when an event occurs at the icx pin. the events that cause a capture event are listed below in three categories: ? simple capture event modes: - capture timer value on every falling edge of input at icx pin - capture timer value on every rising edge of input at icx pin ? capture timer value on every edge (rising and falling) ? prescaler capture event modes: - capture timer value on every 4th rising edge of input at icx pin - capture timer value on every 16th rising edge of input at icx pin each input capture channel can select one of the two 16-bit timers (timer2 or timer3) for the time base. the selected timer can use either an internal or external clock. other operational features include: ? device wake-up from capture pin during cpu sleep and idle modes ? interrupt on in put capture event ? 4-word fifo buffer for capture values - interrupt optionally generated after 1, 2, 3 or 4 buffer locations are filled ? use of input capture to provide additional sources of external interrupts figure 14-1: input capture x block diagram note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 12. ?input cap- ture? (ds70198) in the ?dspic33f/ pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. icxbuf icx pin icm<2:0> (icxcon<2:0>) mode select 3 set flag icxif (in ifsx register) edge detection logic 16 16 icxi<1:0> icov, icbne (icxcon<4:3>) icxcon interrupt logic system bus from 16-bit timers ictmr (icxcon<7>) fifo prescaler counter (1, 4, 16) and clock synchronizer note 1: an ?x? in a signal, register or bit nam e denotes the number of the capture channel. fifo r/w logic tmr2 tmr3 10
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 224 ? 2009-2012 microchip technology inc. 14.1 input capture registers register 14-1: icxcon: input captur e x control register (x = 1 or 2) u-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ? ?icsidl ? ? ? ? ? bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-0, hc r-0, hc r/w-0 r/w-0 r/w-0 ictmr ici<1:0> icov icbne icm<2:0> bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as ? 0 ? bit 13 icsidl: input capture x stop in idle control bit 1 = input capture module halts in cpu idle mode 0 = input capture module continue s to operate in cpu idle mode bit 12-8 unimplemented: read as ? 0 ? bit 7 ictmr: input capture x timer select bit 1 = tmr2 contents are captured on capture event 0 = tmr3 contents are captured on capture event bit 6-5 ici<1:0>: select number of capt ures per interrupt bits 11 = interrupt on every fourth capture event 10 = interrupt on every third capture event 01 = interrupt on every second capture event 00 = interrupt on every capture event bit 4 icov: input capture x overflow status flag bit (read-only) 1 = input capture overflow occurred 0 = no input capture overflow occurred bit 3 icbne: input capture x buffer empty status bit (read-only) 1 = input capture buffer is not empty, at least one more capture value can be read 0 = input capture buffer is empty bit 2-0 icm<2:0>: input capture mode select bits 111 = input capture functions as inte rrupt pin only when device is in sleep or idle mode. rising edge detect-only; all other control bits are not applicable. 110 = unused (module disabled) 101 = capture mode, every 16th rising edge 100 = capture mode, every 4th rising edge 011 = capture mode, every rising edge 010 = capture mode, every falling edge 001 = capture mode, every edge (rising and falling). ic i<1:0> bits do not control interrupt generation for this mode. 000 = input capture module is turned off
? 2009-2012 microchip technology inc. ds70591e-page 225 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 15.0 output compare the output compare module c an select either timer2 or timer3 for its time base . the module compares the value of the timer with the value of one or two compare registers depending on the operating mode selected. the state of the output pi n changes when the timer value matches the compare register value. the output compare module generates either a single output pulse, or a sequence of outpu t pulses, by changing the state of the output pin on the compare match events. the output compare module can also generate interrupts on compare match events. the output compare module has multiple operating modes: ? active-low one-shot mode ? active-high one-shot mode ? toggle mode ? delayed one-shot mode ? continuous pulse mode ? pwm mode without fault protection ? pwm mode with fault protection figure 15-1: output compare module block diagram note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 13. ?output compare? (ds70209) in the ?dspic33f/ pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. ocxr comparator ocm<2:0> output enable ocx set flag bit ocxif ocxrs mode select 3 0 1 octsel 0 1 16 16 ocfa tmr2 tmr2 q s r tmr3 tmr3 rollover rollover note: an ?x? in a signal, register or bit name denot es the number of the output compare channels. output logic
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 226 ? 2009-2012 microchip technology inc. 15.1 output compare modes configure the output compare modes by setting the appropriate output compare mode (ocm<2:0>) bits in the output compare control (ocxcon<2:0>) register. table 15-1 lists the different bit settings for the output compare modes. figure 15-2 illustrates the output compare operation for various modes. the user application must disable the associated timer when writing to the output compare control registers to avoid malfunctions. table 15-1: output compare modes figure 15-2: output compare operation note: see section 13. ?output compare? (ds70209) in the ?dspic33f/pic24h family reference manual? for ocxr and ocxrs register restrictions. ocm<2:0> mode ocx pin initial state ocx interrupt generation 000 module disabled controlled by gpio register ? 001 active-low one-shot 0 ocx rising edge 010 active-high one-shot 1 ocx falling edge 011 toggle current output is maintained ocx rising and falling edge 100 delayed one-shot 0 ocx falling edge 101 continuous pulse 0 ocx falling edge 110 pwm without fault protection ? 0 ? if ocxr is zero ? 1 ? if ocxr is non-zero no interrupt 111 pwm with fault protection ? 0 ? if ocxr is zero ? 1 ? if ocxr is non-zero ocfa falling edge for oc1 to oc4 ocxrs tmry ocxr timer is reset on period match continuous pulse (ocm = 101 ) pwm (ocm = 110 or 111 ) active-low one-shot (ocm = 001 ) active-high one-shot (ocm = 010 ) toggle (ocm = 011 ) delayed one-shot (ocm = 100 ) output compare mode enabled
? 2009-2012 microchip technology inc. ds70591e-page 227 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 15-1: ocxcon: output compare x control register (x = 1, 2) u-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ? ?ocsidl ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 r-0, hc r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? ocflt octsel ocm<2:0> bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as ? 0 ? bit 13 ocsidl: output compare x stop in idle mode control bit 1 = output compare x halts in cpu idle mode 0 = output compare x continues to operate in cpu idle mode bit 12-5 unimplemented: read as ? 0 ? bit 4 ocflt: pwm fault condition status bit 1 = pwm fault condition has occurred (cleared in hardware only) 0 = no pwm fault condition has occurred (this bit is only used when ocm<2:0> = 111 ) bit 3 octsel: output compare x timer select bit 1 = timer3 is the clock source for compare x 0 = timer2 is the clock source for compare x bit 2-0 ocm<2:0>: output compare mode select bits 111 = pwm mode on ocx, fault pin is enabled 110 = pwm mode on ocx, fault pin is disabled 101 = initializes ocx pin low, generates continuous output pulses on ocx pin 100 = initializes ocx pin low, generates single output pulse on ocx pin 011 = compare event toggles ocx pin 010 = initializes ocx pin high, compare event forces ocx pin low 001 = initializes ocx pin low, compare event forces ocx pin high 000 = output compare channel is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 228 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 229 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 16.0 high-speed pwm the high-speed pwm module on the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608 /610 devices supports a wide variety of pwm modes and output formats. this pwm module is ideal for power conversion applications, such as: ? ac/dc converters ? dc/dc converters ? power factor correction ? uninterruptible power supply (ups) ?inverters ? battery chargers ? digital lighting 16.1 features overview the high-speed pwm module incorporates the following features: ? two master time base modules ? up to nine pwm generators with up to 18 outputs ? two pwm outputs per pwm generator ? individual time base and duty cycle for each pwm output ? duty cycle, dead time, phase shift and frequency resolution of 1.04 ns ? independent fault and current-limit inputs for eight pwm outputs ? redundant output ? true independent output ? center-aligned pwm mode ? output override control ? chop mode (also known as gated mode) ? special event trigger ? prescaler for input clock ? dual trigger from pwm to analog-to-digital converter (adc) per pwm period ? pwmxl and pwmxh output pin swapping ? independent pwm frequency, duty cycle and phase shift changes ? current compensation ? enhanced leading-edge blanking (leb) functionality ? pwm capture functionality figure 16-1 conceptualizes the pwm module in a simplified block diagram. figure 16-2 illustrates how the module hardware is partitioned for each pwm output pair for the complementary pwm mode. the pwm module contains nine pwm generators. the module has up to 18 pwm output pins: pwm1h/ pwm1l through pwm9h/pwm9l. for complementary outputs, these 18 i/o pins are grouped into high/low pairs. 16.2 feature description the pwm module is designed for applications that require: ? high-resolution at high pwm frequencies ? the ability to drive standard, edge-aligned, center-aligned complementary mode, and push-pull mode outputs ? the ability to create multiphase pwm outputs for center-aligned mode, t he duty cycle, period phase and dead-time resolutions will be 8.32 ns. two common, medium power converter topologies are push-pull and half-bridge. these designs require the pwm output signal to be switched between alternate pins, as provided by the push-pull pwm mode. phase-shifted pwm describes the situation where each pwm generator provides outputs, but the phase relationship between the generator outputs is specifiable and changeable. multiphase pwm is often used to improve dc/dc con- verter load transient response, and reduce the size of output filter capacitors and inductors. multiple dc/dc converters are often operated in parallel, but phase-shifted in time. a single pwm output operating at 250 khz has a period of 4 ? s, but an array of four pwm channels, staggered by 1 ? s each, yields an effective switching frequency of 1 mhz. multiphase pwm applications typically use a fixed-phase relationship. variable phase pwm is useful in zero voltage transition (zvt) power converters. here, the pwm duty cycle is always 50%, and the power flow is controlled by varying the relative phase shift between the two pwm generators. note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 43. ?high-speed pwm? (ds70323) in the ?dspic33f/ pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. note: duty cycle, dead-time, phase shift and frequency resolution is 8.32 ns in center-aligned pwm mode.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 230 ? 2009-2012 microchip technology inc. figure 16-1: high-speed pwmx module architectural diagram cpu master time base pwm generator 1 pwm generator 2 pwm generator 9 syncix syncox pwm1h pwm1l pwm1 interrupt pwm2h pwm2l pwm2 interrupt pwm8h pwm8l pwm8 interrupt pwm9h pwm9l pwm9 interrupt synchronization signal data bus adc module fault and fault, current-limit synchronization signal synchronization signal synchronization signal primary trigger secondary trigger special event trigger current-limit and dead-time compensation fault, current-limit fault, current-limit and dead-time compensation pwm3 through pwm7 primary and secondary and dead-time compensation pwm generator 8
? 2009-2012 microchip technology inc. ds70591e-page 231 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 16-2: simplified conceptual bl ock diagram of the high-speed pwmx mux ptmrx pdcx pwmconx trgconx ptcon, ptcon2 ioconx dtrx pwmxl pwmxh fltn (1) pwm1l pwm1h fclconx phasex lebconx mux stmrx sdcx sphasex altdtrx pwmcapx user override logic current-limit pwm output mode control logic dead- logic pin control logic fault and current-limit logic pwm generator 1 fltn (1) pwm generator 2 ? pwm generator 9 interrupt logic adc trigger module control and timing master duty cycle register synchronization synchronization master period master period master duty cycle master duty cycle secondary pwm synci4 synci1 synco1 sevtcmp comparator special event trigger special event postscaler ptper pmtmr primary master time base master time base counter special event compare trigger comparator clock prescaler comparator comparator comparator 16-bit data bus time trigx fault override logic override logic synco2 sevtcmp comparator special event trigger special event postscaler stper smtmr secondary master time base master time base counter special event compare trigger comparator clock prescaler dtcmpx stcon, stcon2 ? ? ? comparator strigx note 1: n = 1 through 23. adc trigger mdc
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 232 ? 2009-2012 microchip technology inc. 16.3 control registers the following registers control the operation of the high-speed pwm module. ? ptcon: pwm time base control register ? ptcon2: pwm clock divider select register 2 ? ptper: primary master time base period register (1,2) ? sevtcmp: pwm special ev ent compare register (1) ? stcon: pwm secondary master time base control register ? stcon2: pwm secondary clock divider select register 2 ? stper: secondary master time base period register ? ssevtcmp: pwm secondary special event compare register ? chop: pwm chop clock generator register(1) ? mdc: pwm master duty cycle register(1,2) ? pwmconx: pwm control x register ? pdcx: pwm generator duty cycle x register(1,2,3) ? phasex: pwm primary phase shift x register(1,2) ? dtrx: pwm dead-time x register ? altdtrx: pwm alternat e dead-time x register ? sdcx: pwm secondary duty cycle x register(1,2,3) ? sphasex: pwm secondary phase shift x register(1,2) ? trgconx: pwm trigger control x register ? ioconx: pwm i/o control x register ? fclconx: pwm fault current-limit control x register ? trigx: pwm primary trigger x compare value register ? strigx: pwm secondary trigger x compare value register (1) ? lebconx: leading-edge blanking control x register ? lebdlyx: leading-edge blanking delay x register ? auxconx: pwm auxiliary control x register ? pwmcapx: primary pwm time base capture x register
? 2009-2012 microchip technology inc. ds70591e-page 233 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-1: ptcon: pwm time base control register r/w-0 u-0 r/w-0 hs/hc-0 r/w-0 r/w-0 r/w-0 r/w-0 pten ? ptsidl sestat seien eipu ( 1 ) syncpol ( 1 ) syncoen ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 syncen ( 1 ) syncsrc<2:0> ( 1 ) sevtps<3:0> ( 1 ) bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 pten: pwm module enable bit 1 = pwm module is enabled 0 = pwm module is disabled bit 14 unimplemented: read as ? 0 ? bit 13 ptsidl: pwm time base stop in idle mode bit 1 = pwm time base halts in cpu idle mode 0 = pwm time base runs in cpu idle mode bit 12 sestat: special event interrupt status bit 1 = special event interrupt is pending 0 = special event interrupt is not pending bit 11 seien: special event interrupt enable bit 1 = special event interrupt is enabled 0 = special event interrupt is disabled bit 10 eipu: enable immediate period updates bit ( 1 ) 1 = active period register is updated immediately 0 = active period register updates occur on pwm cycle boundaries bit 9 syncpol: synchronize input and output polarity bit ( 1 ) 1 = syncix/synco1 polarity is inverted (active-low) 0 = syncix/synco1 is active-high bit 8 syncoen: primary time base synchronization enable bit ( 1 ) 1 = synco1 output is enabled 0 = synco1 output is disabled bit 7 syncen: external time base synchronization enable bit ( 1 ) 1 = external synchronization of primary time base is enabled 0 = external synchronization of primary time base is disabled bit 6-4 syncsrc<2:0>: synchronous source selection bits ( 1 ) 111 = reserved 101 = reserved 100 = reserved 011 = synci4 010 = synci3 001 = synci2 000 = synci1 note 1: these bits should be changed only when pten = 0 . in addition, when using t he syncix feature, the user application must program the period re gister with a value that is slightly larger than the expected period of the external synchronization input signal.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 234 ? 2009-2012 microchip technology inc. bit 3-0 sevtps<3:0>: pwm special event trigger output postscaler select bits ( 1 ) 1111 = 1:16 postscaler generates special event trigger on every sixteenth compare match event ? ? ? 0001 = 1:2 postscaler generates special event tr igger on every second compare match event 0000 = 1:1 postscaler generates special even t trigger on every compare match event register 16-1: ptcon: pwm time base control register (continued) note 1: these bits should be changed only when pten = 0 . in addition, when using t he syncix feature, the user application must program the period re gister with a value that is slightly larger than the expected period of the external synchronization input signal.
? 2009-2012 microchip technology inc. ds70591e-page 235 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-2: ptcon2: pwm cl ock divider select register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 ? ? ? ? ? pclkdiv<2:0> ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 unimplemented: read as ? 0 ? bit 2-0 pclkdiv<2:0>: pwm input clock prescaler (divider) select bits ( 1 ) 111 = reserved 110 = divide-by-64, maximum pwm timing resolution 101 = divide-by-32, maximum pwm timing resolution 100 = divide-by-16, maximum pwm timing resolution 011 = divide-by-8, maximu m pwm timing resolution 010 = divide-by-4, maximu m pwm timing resolution 001 = divide-by-2, maximu m pwm timing resolution 000 = divide-by-1, maximum pwm timing resolution (power-on default) note 1: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. register 16-3: ptper: primary ma ster time base period register ( 1 , 2 ) r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 ptper<15:8> bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 ptper<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 ptper<15:0>: primary master time base (pmtmr) period value bits note 1: the pwm time base has a minimum value of 0x0010 and a maximum value of 0xfff8. 2: any period value that is less than 0x0028 must have the least significant 3 bits set to ? 0 ?, thus yielding a period resolution at 8.32 ns (at fastest auxiliary clock rate).
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 236 ? 2009-2012 microchip technology inc. register 16-4: sevtcmp: pwm special event compare register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sevtcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 sevtcmp<7:3> ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 sevtcmp<15:3>: special event compare count value bits bit 2-0 unimplemented: read as ? 0 ? note 1: one lsb = 1.04 ns (at fastest auxiliary clock rate); therefore, the minimum sevtcmp resolution is 8.32 ns.
? 2009-2012 microchip technology inc. ds70591e-page 237 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-5: stcon: pwm secondary master time base control register u-0 u-0 u-0 hs/hc-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? sestat seien eipu ( 1 ) syncpol syncoen bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 syncen syncsrc<2:0> sevtps<3:0> bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 12 sestat: special event interrupt status bit 1 = secondary special event interrupt is pending 0 = secondary special event interrupt is not pending bit 11 seien: special event interrupt enable bit 1 = secondary special event interrupt is enabled 0 = secondary special event interrupt is disabled bit 10 eipu: enable immediate period updates bit ( 1 ) 1 = active secondary period register is updated immediately 0 = active secondary period register updates occur on pwm cycle boundaries bit 9 syncpol: synchronize input and output polarity bit 1 = syncix/synco2 polarity is inverted (active-low) 0 = syncix/synco2 polarity is active-high bit 8 syncoen: secondary master time base synchronization enable bit 1 = synco2 output is enabled. 0 = synco2 output is disabled bit 7 syncen: external secondary master time base synchronization enable bit 1 = external synchronization of secondary time base is enabled 0 = external synchronization of secondary time base is disabled bit 6-4 syncsrc<2:0>: pwm secondary time base synchronization source selection bits 111 = reserved 101 = reserved 100 = reserved 011 = synci4 010 = synci3 001 = synci2 000 = synci1 bit 3-0 sevtps<3:0>: pwm secondary special event trig ger output postscaler select bits 1111 = 1:16 postcale 0001 = 1:2 postcale ? ? ? 0000 = 1:1 postscale note 1: this bit only applies to the secondary master time base period.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 238 ? 2009-2012 microchip technology inc. register 16-6: stcon2: pwm seconda ry clock divider select register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 ? ? ? ? ? pclkdiv<2:0> ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 unimplemented: read as ? 0 ? bit 2-0 pclkdiv<2:0>: pwm input clock prescale r (divider) select bits ( 1 ) 111 = reserved 110 = divide-by-64, maximum pwm timing resolution 101 = divide-by-32, maximum pwm timing resolution 100 = divide-by-16, maximum pwm timing resolution 011 = divide-by-8, maximu m pwm timing resolution 010 = divide-by-4, maximu m pwm timing resolution 001 = divide-by-2, maximu m pwm timing resolution 000 = divide-by-1, maximum pwm timing resolution (power-on default) note 1: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. register 16-7: stper: secondary master time base period register r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 stper<15:8> bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 stper<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 stper<15:0>: secondary master time base (smtmr) period value bits
? 2009-2012 microchip technology inc. ds70591e-page 239 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-8: ssevtcmp: pwm secondar y special event compare register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ssevtcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 ssevtcmp<7:3> ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 ssevtcmp<15:3>: special event compare count value bits bit 2-0 unimplemented: read as ? 0 ? register 16-9: chop: pwm ch op clock generator register ( 1 ) r/w-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 chpclken ? ? ? ? ? chop<9:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 chop<7:3> ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 chpclken: enable chop clock generator bit 1 = chop clock generator is enabled 0 = chop clock generator is disabled bit 14-10 unimplemented: read as ? 0 ? bit 9-3 chop<9:3>: chop clock divider bits value in 8.32 ns increments. the frequency of the chop clock signal is given by the following expression: chop frequency = 1/(16.64 * (chop<7:3> + 1) * primary master pwm input clock period) bit 2-0 unimplemented: read as ? 0 ? note 1: the chop clock generator operates with the primar y pwm clock prescaler (pclkdiv<2:0>) in the ptcon2 register ( register 16-2 ).
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 240 ? 2009-2012 microchip technology inc. register 16-10: mdc: pwm master duty cycle register ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 mdc<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 mdc<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 mdc<15:0>: pwm master duty cycle value bits note 1: the smallest pulse width that can be generated on the pwm output corresponds to a value of 0x0008, while the maximum pulse width generated corresponds to a value of period ? 0x0008. 2: as the duty cycle gets closer to 0% or 100% of th e pwm period (0 to 40 ns, depending on the mode of operation), the pwm duty cycle resoluti on will increase from 1 to 3 lsbs.
? 2009-2012 microchip technology inc. ds70591e-page 241 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-11: pwmconx: pwm control x register hs/hc-0 hs/hc-0 hs/hc-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 fltstat ( 1 ) clstat ( 1 ) trgstat fltien clien trgien itb ( 3 ) mdcs ( 3 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 dtc<1:0> dtcp ( 4 ) ?mtbscam ( 2 , 3 , 5 ) xpres ( 6 ) iue bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 fltstat: fault interrupt status bit ( 1 ) 1 = fault interrupt is pending 0 = no fault interrupt is pending this bit is cleared by setting fltien = 0 . bit 14 clstat: current-limit interrupt status bit ( 1 ) 1 = current-limit in terrupt is pending 0 = no current-limit interrupt is pending this bit is cleared by setting clien = 0 . bit 13 trgstat: trigger interrupt status bit 1 = trigger interrupt is pending 0 = no trigger interrupt is pending this bit is cleared by setting trgien = 0 . bit 12 fltien: fault interrupt enable bit 1 = fault interrupt is enabled 0 = fault interrupt is disabled and fltstat bit is cleared bit 11 clien: current-limit interrupt enable bit 1 = current-limit in terrupt is enabled 0 = current-limit interrupt is disabled and clstat bit is cleared bit 10 trgien: trigger interrupt enable bit 1 = a trigger event generates an interrupt request 0 = trigger event interrupts are disabled and trgstat bit is cleared bit 9 itb: independent time base mode bit ( 3 ) 1 = phasex/sphasex registers provide time base period for this pwm generator 0 = ptper register provides timing for this pwm generator bit 8 mdcs: master duty cycle register select bit ( 3 ) 1 = mdc register provides duty cycle information for this pwm generator 0 = pdcx and sdcx registers provide duty cycle information for this pwm generator note 1: software must clear the interrupt status here and in the corresponding ifsx bit in the interrupt controller. 2: the independent time base mode (itb = 1 ) must be enabled to use center-aligned mode. if itb = 0 , the cam bit is ignored. 3: these bits should not be changed after the pwm is enabled by setting pten (ptcon<15>) = 1 . 4: for dtcp to be effective, dtc<1:0> must be set to ? 11 ?; otherwise, dtcp is ignored. 5: center-aligned mode ignores the least significant 3 bits of the duty cycle, phase and dead-time registers. the highest center-aligned mode resolution av ailable is 8.32 ns with the clock prescaler set to the fastest clock. 6: configure clmod (fclconx<8>) = 0 and itb (pwmconx<9>) = 1 to operate in external period reset mode.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 242 ? 2009-2012 microchip technology inc. bit 7-6 dtc<1:0>: dead-time control bits 11 = dead-time compensation mode 10 = dead-time function is disabled 01 = negative dead time is actively applied for complementary output mode 00 = positive dead time is actively applied for all output modes bit 5 dtcp: dead-time compensation polarity bit ( 4 ) 1 = if dtcmpx = 0 , pwmxl is shortened and pwmxh is lengthened if dtcmpx = 1 , pwmxh is shortened and pwmxl is lengthened 0 = if dtcmpx = 0 , pwmxh is shortened and pwmlx is lengthened if dtcmpx = 1 , pwmxl is shortened and pwmxh is lengthened bit 4 unimplemented: read as ? 0 ? bit 3 mtbs: master time base select bit 1 = pwm generator uses the secondary master time base for synchronization and the clock source for the pwm generation logic (if secondary time base is available) 0 = pwm generator uses the primary master time base for synchronization and the clock source for the pwm generation logic bit 2 cam: center-aligned mode enable bit ( 2 , 3 , 5 ) 1 = center-aligned mode is enabled 0 = edge-aligned mode is enabled bit 1 xpres: external pwm reset control bit ( 6 ) 1 = current-limit source resets the time base for this pwm generat or if it is in independent time base mode 0 = external pins do not affect pwm time base bit 0 iue: immediate update enable bit 1 = updates to the active mdc/pdcx/sdcx registers are immediate 0 = updates to the active pdcx register s are synchronized to the pwm time base register 16-11: pwmconx: pwm co ntrol x register (continued) note 1: software must clear the interrupt status here and in the corresponding ifsx bit in the interrupt controller. 2: the independent time base mode (itb = 1 ) must be enabled to use center-aligned mode. if itb = 0 , the cam bit is ignored. 3: these bits should not be changed after the pwm is enabled by setting pten (ptcon<15>) = 1 . 4: for dtcp to be effective, dtc<1:0> must be set to ? 11 ?; otherwise, dtcp is ignored. 5: center-aligned mode ignores the least significant 3 bits of the duty cycle, phase and dead-time registers. the highest center-aligned mode resolution available is 8.32 ns with the clock prescaler set to the fastest clock. 6: configure clmod (fclconx<8>) = 0 and itb (pwmconx<9>) = 1 to operate in external period reset mode.
? 2009-2012 microchip technology inc. ds70591e-page 243 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-12: pdcx: pwm generator duty cycle x register ( 1 , 2 , 3 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pdcx<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pdcx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 pdcx<15:0>: pwm generator # duty cycle value bits note 1: in independent pwm mode, the pdcx register controls the pwmxh duty cycle only. in the complementary, redundant and push-pull pwm modes, the pdcx register controls the du ty cycle of both the pwmxh and pwmxl. 2: the smallest pulse width that can be generated on the pwm output corresponds to a value of 0x0008, while the maximum pulse width generated corresponds to a value of period ? 0x0008. 3: as the duty cycle gets closer to 0% or 100% of the pwm period (0 to 40 ns, depending on the mode of operation), pwm duty cycle resolution will increase from 1 to 3 lsbs. register 16-13: sdcx: pwm secondary duty cycle x register ( 1 , 2 , 3 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sdcx<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sdcx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 sdcx<15:0>: secondary duty cycle bits for pwmxl output pin note 1: the sdcx register is used in independent pwm m ode only. when used in independent pwm mode, the sdcx register controls the pwmxl duty cycle. 2: the smallest pulse width that can be generated on the pwm output corresponds to a value of 0x0008, while the maximum pulse width generated corresponds to a value of period ? 0x0008. 3: as the duty cycle gets closer to 0% or 100% of the pwm period (0 to 40 ns, depending on the mode of operation), pwm duty cycle resolution will increase from 1 to 3 lsbs.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 244 ? 2009-2012 microchip technology inc. register 16-14: phasex: pwm pr imary phase shift x register ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 phasex<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 phasex<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 phasex<15:0>: pwm phase shift value or independent time base period for the pwm generator bits note 1: if pwmconx<9> = 0 , the following applies based on the mode of operation: ? complementary, redundant and push-pull output mode (ioconx<10:8> = 00 , 01 or 10 ), phasex<15:0> = phase shift value for pwmxh and pwmxl outputs. ? true independent output mode (ioconx<10:8> = 11 ), phasex<15:0> = p hase shift value for pwmxh only. ? the phasex/sphasex registers provide the phase shift with respect to t he master time base; therefore, the valid range is 0x0000 through period. 2: if pwmconx<9> = 1 , the following applies based on the mode of operation: ? complementary, redundant and push-pull output mode (ioconx<10:8> = 00 , 01 or 10 ), phasex<15:0> = independent time base period value for pwmxh and pwmxl. ? true independent output mode (ioconx<10:8> = 11 ). phasex<15:0> = independent time base period value for pwmxh only. ? when the phasex/sphasex register s provide the local period, the valid range is 0x0000 through 0xfff8.
? 2009-2012 microchip technology inc. ds70591e-page 245 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-15: sphase x: pwm secondary phase shift x register ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sphasex<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sphasex<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 sphasex<15:0>: secondary phase offset bits for pwmx l output pin bits (used in independent pwm mode only) note 1: if pwmconx<9> = 0 , the following applies based on the mode of operation: ? complementary, redundant and push-pull output mode (ioconx<10:8> = 00 , 01 or 10 ), sphasex<15:0> = not used. ? true independent output mode (ioconx<10:8> = 11 ), phasex<15:0> = p hase shift value for pwmxl only. ? the phasex/sphasex registers provide the phase shift with respect to t he master time base; therefore, the valid range is 0x0000 through period. 2: if pwmconx<9> = 1 , the following applies based on the mode of operation: ? complementary, redundant and push-pull output mode (ioconx<10:8> = 00 , 01 or 10 ), sphasex<15:0> = not used. ? true independent output mode (ioconx<10:8> = 11 ). phasex<15:0> = independent time base period value for pwmxl only. ? when the phasex/sphasex registers provide the lo cal period, the valid range of values is 0x0010-0xfff8.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 246 ? 2009-2012 microchip technology inc. register 16-16: dtrx: pwm dead-time x register u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? dtrx<13:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dtrx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as ? 0 ? bit 13-0 dtrx<13:0>: unsigned 14-bit value for pwmx dead-time unit bits register 16-17: altdtrx: pwm alternate dead-time x register u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? altdtrx<13:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 altdtrx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as ? 0 ? bit 13-0 altdtrx<13:0>: unsigned 14-bit value for pwmx dead-time unit bits
? 2009-2012 microchip technology inc. ds70591e-page 247 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-18: trgconx: pw m trigger control x register r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 trgdiv<3:0> ? ? ? ? bit 15 bit 8 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dtm ( 1 ) ?trgstrt<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 trgdiv<3:0>: trigger # output divider bits 1111 = trigger output for every 16th trigger event 1110 = trigger output for every 15th trigger event 1101 = trigger output for every 14th trigger event 1100 = trigger output for every 13th trigger event 1011 = trigger output for every 12th trigger event 1010 = trigger output for every 11th trigger event 1001 = trigger output for every 10th trigger event 1000 = trigger output for every 9th trigger event 0111 = trigger output for every 8th trigger event 0110 = trigger output for every 7th trigger event 0101 = trigger output for every 6th trigger event 0100 = trigger output for every 5th trigger event 0011 = trigger output for every 4th trigger event 0010 = trigger output for every 3rd trigger event 0001 = trigger output for every 2nd trigger event 0000 = trigger output for every trigger event bit 11-8 unimplemented: read as ? 0 ? bit 7 dtm: dual trigger mode bit ( 1 ) 1 = secondary trigger event is combined with the pr imary trigger event to create the pwm trigger 0 = secondary trigger event is not combined with the primary trigger event to create the pwm trigger; two separate pwm triggers are generated bit 6 unimplemented: read as ? 0 ? bit 5-0 trgstrt<5:0>: trigger postscaler start enable select bits 111111 = waits 63 pwm cycles before generating the first trigger event after the module is enabled ? ? ? 000010 = waits 2 pwm cycles before generating the first trigger event after the module is enabled 000001 = waits 1 pwm cycle before generating the first trigger event after the module is enabled 000000 = waits 0 pwm cycles before generating the first trigger event after the module is enabled note 1: the secondary pwm generator cannot generate pwm trigger interrupts.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 248 ? 2009-2012 microchip technology inc. aa register 16-19: ioconx: pw m i/o control x register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 penh penl polh poll pmod<1:0> ( 1 ) ovrenh ovrenl bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ovrdat<1:0> fltdat<1:0> ( 2 ) cldat<1:0> ( 2 ) swap osync bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 penh: pwmxh output pin ownership bit 1 = pwm module controls pwmxh pin 0 = gpio module controls pwmxh pin bit 14 penl: pwmxl output pin ownership bit 1 = pwm module controls pwmxl pin 0 = gpio module controls pwmxl pin bit 13 polh: pwmxh output pin polarity bit 1 = pwmxh pin is active-low 0 = pwmxh pin is active-high bit 12 poll: pwmxl output pin polarity bit 1 = pwmxl pin is active-low 0 = pwmxl pin is active-high bit 11-10 pmod<1:0>: pwm # i/o pin mode bits ( 1 ) 11 = pwm i/o pin pair is in the true independent output mode 10 = pwm i/o pin pair is in the push-pull output mode 01 = pwm i/o pin pair is in the redundant output mode 00 = pwm i/o pin pair is in the complementary output mode bit 9 ovrenh: override enable for pwmxh pin bit 1 = ovrdat<1> provides data for output on pwmxh pin 0 = pwm generator provides data for output on pwmxh pin bit 8 ovrenl: override enable for pwmxl pin bit 1 = ovrdat<0> provides data for output on pwmxl pin 0 = pwm generator provides data for output on pwmxl pin bit 7-6 ovrdat<1:0>: data for pwmxh, pwmxl pins if override is enabled bits if overenh = 1 , ovrdat<1> provides data for pwmxh if overenl = 1 , ovrdat<0> provides data for pwmxl bit 5-4 fltdat<1:0>: state for pwmxh and pwmxl pins if fltmod is enabled bits ( 2 ) ifltmod (fclconx<15>) = 0 : normal fault mode: if fault is active, then fltdat<1> provides the state for pwmxh. if fault is active, then fltdat<0> provides the state for pwmxl. ifltmod (fclconx<15>) = 1 : independent fault mode: if current-limit is acti ve, then fltdat<1> provides the state for pwmxh. if fault is active, then fltdat<0> provides the state for pwmxl. note 1: these bits should not be changed after the pwm module is enabled (pten = 1 ). 2: state represents the active/inactive state of t he pwm depending on the polh and poll bit settings.
? 2009-2012 microchip technology inc. ds70591e-page 249 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 3-2 cldat<1:0>: state for pwmxh and pwmxl pins if clmod is enabled bits ( 2 ) ifltmod (fclconx<15>) = 0 : normal fault mode: if current-limit is acti ve, then cldat<1> provides the state for pwmxh. if current-limit is acti ve, then cldat<0> provides the state for pwmxl. ifltmod (fclconx<15>) = 1 : independent fault mode: cldat<1:0> is ignored. bit 1 swap: swap pwmxh and pwmxl pins bit 1 = pwmxh output signal is connected to the pwmx l pin; pwmxl output signal is connected to the pwmxh pin 0 = pwmxh and pwmxl pins are mapped to their respective pins bit 0 osync: output override synchronization bit 1 = output overrides, via the ovrdat<1:0> bi ts, are synchronized to the pwm time base 0 = output overrides, via the ovddat<1:0> bits, occur on next cpu clock boundary register 16-19: ioconx: pwm i/o control x register (continued) note 1: these bits should not be changed after the pwm module is enabled (pten = 1 ). 2: state represents the active/inactive state of t he pwm depending on the polh and poll bit settings. register 16-20: trigx: pwm primar y trigger x compare value register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 trgcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 trgcmp<7:3> ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 trgcmp<15:3>: trigger compare value bits when the primary pwm functions in the local time ba se, this register contains the compare values that can trigger the adc module. bit 2-0 unimplemented: read as ? 0 ?
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 250 ? 2009-2012 microchip technology inc. register 16-21: fclconx: pwm fau lt current-limit control x register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ifltmod clsrc<4:0> ( 2 , 3 ) clpol ( 1 ) clmod bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 fltsrc<4:0> ( 2 , 3 ) fltpol ( 1 ) fltmod<1:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 ifltmod: independent fault mode enable bit 1 = independent fault mode: current-limit input maps fltdat<1> to pwmxh output and fault input maps fltdat<0> to pwmxl output. the cldat<1:0> bits are not used for override functions. 0 = normal fault mode: current-limit mode maps cldat<1:0> bits to the pwmxh and pwmxl outputs. the pwm fault mode maps fltdat<1:0> to the pwmxh and pwmxl outputs. bit 14-10 clsrc<4:0>: current-limit control signal source select for pwm generator # bits ( 2 , 3 ) these bits also specify the source for the dead-time compensation input signal, dtcmpx. 11111 = reserved 11110 = fault 23 11101 = fault 22 11100 = fault 21 11011 = fault 20 11010 = fault 19 11001 = fault 18 11000 = fault 17 10111 = fault 16 10110 = fault 15 10101 = fault 14 10100 = fault 13 10011 = fault 12 10010 = fault 11 10001 = fault 10 10000 = fault 9 01111 = fault 8 01110 = fault 7 01101 = fault 6 01100 = fault 5 01011 = fault 4 01010 = fault 3 01001 = fault 2 01000 = fault 1 00111 = reserved 00110 = reserved 00101 = reserved 00100 = reserved 00011 = analog comparator 4 00010 = analog comparator 3 00001 = analog comparator 2 00000 = analog comparator 1 note 1: these bits should be changed only when pten (ptcon<15>) = 0 . 2: when independent fault mode is enabled (ifltmod = 1 ) and fault 1 is used for current-limit mode (clsrc<4:0> = b0000 ), the fault control source select bits (fltsrc<4:0>) should be set to an unused fault source to prevent fault 1 from disabling both the pwmxl and pwmxh outputs. 3: when independent fault mode is enabled (ifltmod = 1 ) and fault 1 is used for fault mode (fltsrc<4:0> = b0000 ), the current-limit control source select bits (clsrc<4:0>) should be set to an unused current-limit source to prevent the current-limit source from disabling both the pwmxh and pwmxl outputs.
? 2009-2012 microchip technology inc. ds70591e-page 251 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 9 clpol: current-limit polarity for pwm generator # bit ( 1 ) 1 = the selected current-limit source is active-low 0 = the selected current-limit source is active-high bit 8 clmod: current-limit mode enabl e for pwm generator # bit 1 = current-limit mode is enabled 0 = current-limit mode is disabled bit 7-3 fltsrc<4:0>: fault control signal source select for pwm generator # bits ( 2 , 3 ) 11111 = reserved 11110 = fault 23 11101 = fault 22 11100 = fault 21 11011 = fault 20 11010 = fault 19 11001 = fault 18 11000 = fault 17 10111 = fault 16 10110 = fault 15 10101 = fault 14 10100 = fault 13 10011 = fault 12 10010 = fault 11 10001 = fault 10 10000 = fault 9 01111 = fault 8 01110 = fault 7 01101 = fault 6 01100 = fault 5 01011 = fault 4 01010 = fault 3 01001 = fault 2 01000 = fault 1 00111 = reserved 00110 = reserved 00101 = reserved 00100 = reserved 00011 = analog comparator 4 00010 = analog comparator 3 00001 = analog comparator 2 00000 = analog comparator 1 bit 2 fltpol: fault polarity for pwm generator # bit ( 1 ) 1 = the selected fault source is active-low 0 = the selected fault source is active-high bit 1-0 fltmod<1:0>: fault mode for pwm generator # bits 11 = fault input is disabled 10 = reserved 01 = the selected fault source forces pwmxh, pwmxl pins to fltdat values (cycle) 00 = the selected fault source forces pwmxh, pw mxl pins to fltdat values (latched condition) register 16-21: fclconx: pwm fault current -limit control x register (continued) note 1: these bits should be changed only when pten (ptcon<15>) = 0 . 2: when independent fault mode is enabled (ifltmod = 1 ) and fault 1 is used for current-limit mode (clsrc<4:0> = b0000 ), the fault control source select bits (fltsrc<4:0>) should be set to an unused fault source to prevent fault 1 from disabling both the pwmxl and pwmxh outputs. 3: when independent fault mode is enabled (ifltmod = 1 ) and fault 1 is used for fault mode (fltsrc<4:0> = b0000 ), the current-limit control source select bits (clsrc<4:0>) should be set to an unused current-limit source to prevent the current-limit source from disabling both the pwmxh and pwmxl outputs.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 252 ? 2009-2012 microchip technology inc. register 16-22: strigx: pwm secondary trigger x compare value register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 strgcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 strgcmp<7:3> ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 strgcmp<15:3>: pwm secondary trigger compare value bits when the secondary pwm functions in a local time bas e, this register contains the compare values that can trigger the adc module. bit 2-0 unimplemented: read as ? 0 ? note 1: strigx cannot generate the pwm trigger interrupts.
? 2009-2012 microchip technology inc. ds70591e-page 253 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-23: lebconx: leading-edge blanking control x register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 phr phf plr plf fltleben clleben ? ? bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ?bch ( 1 ) bcl ( 1 ) bphh bphl bplh bpll bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 phr: pwmxh rising edge trigger enable bit 1 = rising edge of pwmxh will trigger leading-edge blanking counter 0 = leading-edge blanking ignores rising edge of pwmxh bit 14 phf: pwmxh falling edge trigger enable bit 1 = falling edge of pwmxh will trigger leading-edge blanking counter 0 = leading-edge blanking ignores falling edge of pwmxh bit 13 plr: pwmxl rising edge trigger enable bit 1 = rising edge of pwmxl will trigger leading-edge blanking counter 0 = leading-edge blanking ignores rising edge of pwmxl bit 12 plf: pwmxl falling edge trigger enable bit 1 = falling edge of pwmxl will trigger leading-edge blanking counter 0 = leading-edge blanking ignores falling edge of pwmxl bit 11 fltleben: fault input leading-edge blanking enable bit 1 = leading-edge blanking is applied to selected fault input 0 = leading-edge blanking is not applied to selected fault input bit 10 clleben: current-limit leading-edge blanking enable bit 1 = leading-edge blanking is applied to selected current-limit input 0 = leading-edge blanking is not applied to selected current-limit input bit 9-6 unimplemented: read as ? 0 ? bit 5 bch: blanking in selected blanking signal high enable bit ( 1 ) 1 = state blanking (of current-limit and/or fault in put signals) when selected blanking signal is high 0 = no blanking when selected blanking signal is high bit 4 bcl: blanking in selected blanking signal low enable bit ( 1 ) 1 = state blanking (of current-limit and/or fault in put signals) when selected blanking signal is low 0 = no blanking when selected blanking signal is low bit 3 bphh: blanking in pwmxh high enable bit 1 = state blanking (of current-limit and/or faul t input signals) when pwmxh output is high 0 = no blanking when pwmxh output is high bit 2 bphl: blanking in pwmxh low enable bit 1 = state blanking (of current-limit and/or faul t input signals) when pwmxh output is low 0 = no blanking when pwmxh output is low bit 1 bplh: blanking in pwmxl high enable bit 1 = state blanking (of current-limit and/or faul t input signals) when pwmxl output is high 0 = no blanking when pwmxl output is high bit 0 bpll: blanking in pwmxl low enable bit 1 = state blanking (of current-limit and/or faul t input signals) when pwmxl output is low 0 = no blanking when pwmxl output is low note 1: the blanking signal is sele cted via the blankselx bits in the auxconx register.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 254 ? 2009-2012 microchip technology inc. register 16-24: lebdlyx: leading-edge blanking delay x register u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? ? leb<11:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 leb<7:3> ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11-3 leb<11:3>: leading-edge blanking delay for current-limit and fault inputs bits the value is in 8.32 ns increments. bit 2-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 255 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 16-25: auxconx: pwm auxiliary control x register r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 hrpdis hrddis ? ? blanksel<3:0> bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? chopsel<3:0> chophen choplen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 hrpdis: high-resolution pwm period disable bit 1 = high-resolution pwm period is disabled to reduce power consumption 0 = high-resolution pwm period is enabled bit 14 hrddis: high-resolution pwm duty cycle disable bit 1 = high-resolution pwm duty cycle is di sabled to reduce power consumption 0 = high-resolution pwm duty cycle is enabled bit 13-12 unimplemented: read as ? 0 ? bit 11-8 blanksel<3:0>: pwm state blank source select bits the selected state blank signal will block the current limit and/or fault input signals (if enabled via the bch and bcl bits in the lebconx register). 1001 = pwm9h is selected as state blank source 1000 = pwm8h is selected as state blank source 0111 = pwm7h is selected as state blank source 0110 = pwm6h is selected as state blank source 0101 = pwm5h is selected as state blank source 0100 = pwm4h is selected as state blank source 0011 = pwm3h is selected as state blank source 0010 = pwm2h is selected as state blank source 0001 = pwm1h is selected as state blank source 0000 = 1?b0 (no state blanking) bit 7-6 unimplemented: read as ? 0 ? bit 5-2 chopsel<3:0>: pwm chop clock source select bits the selected signal will enable and disable (chopx) the selected pwm outputs. 1001 = pwm9h is selected as chop clock source 1000 = pwm8h is selected as chop clock source 0111 = pwm7h is selected as chop clock source 0110 = pwm6h is selected as chop clock source 0101 = pwm5h is selected as chop clock source 0100 = pwm4h is selected as chop clock source 0011 = pwm3h is selected as chop clock source 0010 = pwm2h is selected as chop clock source 0001 = pwm1h is selected as chop clock source 0000 = chop clock generator is selected as the chop clock source bit 1 chophen: pwmxh output chopping enable bit 1 = pwmxh chopping function is enabled 0 = pwmxh chopping function is disabled bit 0 choplen: pwmxl output chopping enable bit 1 = pwmxl chopping function is enabled 0 = pwmxl chopping function is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 256 ? 2009-2012 microchip technology inc. register 16-26: pwmcapx: primary pwm time base capture x register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 pwmcap<15:8> ( 1 , 2 , 3 , 4 ) bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 u-0 u-0 u-0 pwmcap<7:3> ( 1 , 2 , 3 , 4 ) ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-3 pwmcap<15:3>: captured pwm time base value bits ( 1 , 2 , 3 , 4 ) the value in this register represents the capt ured pwm time base value when a leading edge is detected on the current-limit input. bit 2-0 unimplemented: read as ? 0 ? note 1: the capture feature is only avail able on the primary output (pwmxh). 2: this feature is active only after leb processing on the current-limit input signal is complete. 3: the minimum capture resolution is 8.32 ns. 4: this feature can be used when the xpres bit (pwmconx<1>) is set to ? 0 ?.
? 2009-2012 microchip technology inc. ds70591e-page 257 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 17.0 quadrature encoder interface (qei) module this chapter describes the quadrature encoder inter- face (qei) module and associated operational modes. the qei module provides the interface to incremental encoders for obtaining mechanical position data. the operational features of the qei include: ? three input channels for two phase signals and index pulse ? 16-bit up/down position counter ? count direction status ? position measurement (x2 and x4) mode ? programmable digital noise filters on inputs ? alternate 16-bit timer/counter mode ? quadrature encoder interface interrupts these operating modes are determined by setting the appropriate bits, qeim<2:0> in (qeixcon<10:8>). figure 17-1 depicts the quadrature encoder interface block diagram. figure 17-1: quadrature encoder interf ace x block diagram (x = 1 or 2) note 1: this data sheet summarizes the features of the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the inform ation in this data sheet, refer to section 15. ?quadrature encoder interface (qei)? (ds70208) in the ? dspic33f/pic24h family reference manual ?, which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. note: an ?x? used in the names of pins, control/ status bits and registers denotes a particular qei module number (x = 1 or 2). comparator/ qeax (1) indxx (1) 0 1 up/down existing pin logic updnx 3 qebx (1) qeim<2:0> mode select 3 pcdout qexif event flag reset equal 2 t cy 1 0 tqcs tqckps<1:0> 2 q q d ck tqgate qeim<2:0> 1 0 sleep input 0 1 updn_src qeixcon<11> zero-detect 1, 8, 64, 256 prescaler quadrature encoder interface logic programmable digital filter programmable digital filter programmable digital filter note 1: the qei1 module can be connected to the qea1/qeb1/indx1 or aqea1/aqeb1/aindx1 pins, wh ich are controlled by clearing or setting the altqio bit in the fpor configuration register. see section 24.0 ?special features? for more information. synchronize detect 16-bit up/down counter (posxcnt) max count register (maxxcnt)
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 258 ? 2009-2012 microchip technology inc. register 17-1: qeixcon: qeix control register (x = 1 or 2) r/w-0 u-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 cnterr ( 1 ) ? qeisidl index updn ( 2 ) qeim<2:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 swpab pcdout tqgate tqckps<1:0> ( 3 ) posres ( 4 ) tqcs updn_src ( 5 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 cnterr: count error status flag bit ( 1 ) 1 = position count error has occurred 0 = no position count error has occurred bit 14 unimplemented: read as ? 0 ? bit 13 qeisidl: qeix stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 index: index pin state status bit (read-only) 1 = index pin is high 0 = index pin is low bit 11 updn: position counter direction status bit ( 2 ) 1 = position counter dire ction is positive (+) 0 = position counter direction is negative (-) bit 10-8 qeim<2:0>: quadrature encoder interface mode select bits 111 = quadrature encoder interface is enabled (x4 mode) with the position counter reset by the match (maxxcnt) 110 = quadrature encoder interface is enabled (x4 m ode) with the index pulse reset of the position counter 101 = quadrature encoder interface is enabled (x2 mode) with the position counter reset by the match (maxxcnt) 100 = quadrature encoder interface is enabled (x2 m ode) with the index pulse reset of the position counter 011 = unused (module disabled) 010 = unused (module disabled) 001 = starts 16-bit timer 000 = quadrature encoder interface/timer off bit 7 swpab: phase a and phase b input swap select bit 1 = phase a and phase b inputs are swapped 0 = phase a and phase b inputs are not swapped bit 6 pcdout: position counter direction state output enable bit 1 = position counter direction status output is enabled (qei logic controls state of i/o pin) 0 = position counter directio n status output is disabl ed (normal i/o pin operation) note 1: cnterr flag only applies when qeim<2:0> = 110 or 100 . 2: read-only bit when qeim<2:0> = 1xx . read/write bit when qeim<2:0> = 001 . 3: prescaler utilized for 16-bit timer mode only. 4: this bit applies only when qeim<2:0> = 100 or 110. 5: when configured for qei mode, this control bit is a ?don?t care?.
? 2009-2012 microchip technology inc. ds70591e-page 259 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 5 tqgate: timer gated time a ccumulation enable bit 1 = timer gated time accumulation is enabled 0 = timer gated time accumulation is disabled bit 4-3 tqckps<1:0>: timer input clock pr escale select bits ( 3 ) 11 = 1:256 prescale value 10 = 1:64 prescale value 01 = 1:8 prescale value 00 = 1:1 prescale value bit 2 posres: position counter reset enable bit ( 4 ) 1 = index pulse resets position counter 0 = index pulse does not reset position counter bit 1 tqcs: timer clock source select bit 1 = external clock from pin, qeax (on the rising edge) 0 = internal clock (t cy ) bit 0 updn_src: position counter direction selection control bit ( 5 ) 1 = qebx pin state defines the position counter direction 0 = control/status bit, updn (qeixcon<11>), defines the timer counter (posxcnt) direction register 17-1: qeixcon: qeix control register (x = 1 or 2) (continued) note 1: cnterr flag only applies when qeim<2:0> = 110 or 100 . 2: read-only bit when qeim<2:0> = 1xx . read/write bit when qeim<2:0> = 001 . 3: prescaler utilized for 16-bit timer mode only. 4: this bit applies only when qeim<2:0> = 100 or 110. 5: when configured for qei mode, this control bit is a ?don?t care?.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 260 ? 2009-2012 microchip technology inc. register 17-2: dfltxcon: digita l filter x control register u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 ? ? ? ? ?imv<2:0>ceid bit 15 bit 8 r/w-0 r/w-0 u-0 u-0 u-0 u-0 qeout qeck<2:0> ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-9 imv<1:0>: index match value bits ? these bits allow the user application to specify the state of the qeax and qebx input pins during an index pulse when the posxcnt register is to be reset. in x4 quadratu re count mode : imv1 = required state of phase b input signal for match on index pulse imv0 = required state of phase a input signal for match on index pulse in x4 quadratu re count mode : imv1 = selects phase input signal for index state match ( 0 = phase a, 1 = phase b) imv0 = required state of the selected phase input signal for match on index pulse bit 8 ceid: count error interrupt disable bit 1 = interrupts due to count errors are disabled 0 = interrupts due to count errors are enabled bit 7 qeout: qeax/qebx/indxx pin digital filter output enable bit 1 = digital filter outputs are enabled 0 = digital filter outputs are disabled (normal pin operation) bit 6-4 qeck<2:0>: qeax/qebx/indxx digital filt er clock divide select bits 111 = 1:256 clock divide 110 = 1:128 clock divide 101 = 1:64 clock divide 100 = 1:32 clock divide 011 = 1:16 clock divide 010 = 1:4 clock divide 001 = 1:2 clock divide 000 = 1:1 clock divide bit 3-0 unimplemented: read as ? 0 ?
? 2009-2012 microchip technology inc. ds70591e-page 261 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 18.0 serial peripheral interface (spi) the serial peripheral interface (spi) module is a synchronous serial interface useful for communicating with other peripheral or mi crocontroller devices. these peripheral devices can be serial eeproms, shift registers, display drivers, analog-to-digital converters and so on. the spi module is compatible with spi and siop from motorola ? . the spi module consists of a 16-bit shift register, spixsr (where x = 1 or 2), used for shifting data in and out, and a buffer register, spixbuf. a control register, spixcon, configures the module. additionally, a status register, spixstat, indica tes status conditions. the serial interface consis ts of these four pins: ? sdix (serial data input) ? sdox (serial data output) ? sckx (shift clock input or output) ? ssx (active-low slave select) in master mode operation, sck is a clock output; in slave mode, it is a clock input. figure 18-1: spi module block diagram note 1: this data sheet summ arizes the features of the dspic33f j32gs406/606/608/ 610 and dspic33fj64gs406/606/608/ 610 families of devices. it is not intended to be a comprehensive reference source. to complem ent the information in this data sheet, refer to section 18. ?serial peripheral interface (spi)? (ds70206) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. internal data bus sdix sdox ssx (1) sckx bit 0 shift control f cy primary 1:1/4/16/64 enable prescaler sync spixbuf control transfer transfer write spixbuf read spixbuf 16 spixcon1<1:0> spixcon1<4:2> master clock clock control secondary prescaler 1:1 to 1:8 spixrxb spixtxb note 1: the spi1 module can be connected to the ss1 or ass1 pins, which are controlled by clearing or setting the altss1 bit in the fpor configuration register. see section 24.0 ?special features? for more information. spixsr edge select
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 262 ? 2009-2012 microchip technology inc. register 18-1: spixstat: spix status and control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 spien ? spisidl ? ? ? ? ? bit 15 bit 8 u-0 r/c-0 u-0 u-0 u-0 u-0 r-0 r-0 ? spirov ? ? ? ? spitbf spirbf bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 spien: spix enable bit 1 = enables module and configures sckx, sdox, sdix and ssx as serial port pins 0 = disables module bit 14 unimplemented: read as ? 0 ? bit 13 spisidl: spix stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-7 unimplemented: read as ? 0 ? bit 6 spirov: spix receive overflow flag bit 1 = a new byte/word is completely received and discarded; the user software has not read the previous data in the spixbuf register 0 = no overflow has occurred bit 5-2 unimplemented: read as ? 0 ? bit 1 spitbf: spix transmit buffer full status bit 1 = transmit has not yet started, spixtxb is full 0 = transmit has started, spixtxb is empty. auto matically set in hardware when cpu writes the spixbuf location, loading spixtxb. automatica lly cleared in hardware when the spix module transfers data from spixtxb to spixsr. bit 0 spirbf: spix receive buffer full status bit 1 = receive is complete, spixrxb is full 0 = receive is not complete, spixrxb is empty. au tomatically set in hardware when spix transfers data from spixsr to spixrxb. automatically cleared in hardware when the core reads the spixbuf location, reading spixrxb.
? 2009-2012 microchip technology inc. ds70591e-page 263 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 18-2: spi x con1: spix control register 1 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? dissck dissdo mode16 smp cke ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ssen ( 3 ) ckp msten spre<2:0> ( 2 ) ppre<1:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 12 dissck: disable sckx pin bit (spi master modes only) 1 = internal spi clock is disabled; pin functions as i/o 0 = internal spi clock is enabled bit 11 dissdo: disable sdox pin bit 1 = sdox pin is not used by module; pin functions as i/o 0 = sdox pin is controlled by the module bit 10 mode16: word/byte communication select bit 1 = communication is word-wide (16 bits) 0 = communication is byte-wide (8 bits) bit 9 smp: spix data input sample phase bit master mode: 1 = input data sampled at end of data output time 0 = input data sampled at middle of data output time slave mode: smp must be cleared when spix is used in slave mode. bit 8 cke: spix clock edge select bit ( 1 ) 1 = serial output data changes on transition from active clock state to idle clock state (see bit 6) 0 = serial output data changes on transition from idle clock state to active clock state (see bit 6) bit 7 ssen: slave select enable bit (slave mode) ( 3 ) 1 = ssx pin is used for slave mode 0 = ssx pin is not used by module; pin is controlled by port function bit 6 ckp: clock polarity select bit 1 = idle state for clock is a high le vel; active state is a low level 0 = idle state for clock is a low le vel; active state is a high level bit 5 msten: master mode enable bit 1 = master mode 0 = slave mode note 1: the cke bit is not used in the framed spi modes. program this bit to ? 0 ? for the framed spi modes (frmen = 1 ). 2: do not set both primary and secondary prescalers to a value of 1:1. 3: this bit must be cleared when frmen = 1 .
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 264 ? 2009-2012 microchip technology inc. bit 4-2 spre<2:0>: secondary prescale bits (master mode) ( 2 ) 111 = secondary prescale 1:1 110 = secondary prescale 2:1 ? ? ? 000 = secondary prescale 8:1 bit 1-0 ppre<1:0>: primary prescale bits (master mode) ( 2 ) 11 = primary prescale 1:1 10 = primary prescale 4:1 01 = primary prescale 16:1 00 = primary prescale 64:1 register 18-2: spi x con1: spix control register 1 (continued) note 1: the cke bit is not used in the framed spi modes. program this bit to ? 0 ? for the framed spi modes (frmen = 1 ). 2: do not set both primary and secondary prescalers to a value of 1:1. 3: this bit must be cleared when frmen = 1 .
? 2009-2012 microchip technology inc. ds70591e-page 265 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 18-3: spixcon2: spix control register 2 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 frmen spifsd frmpol ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 u-0 ? ? ? ? ? ? frmdly ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 frmen: framed spix support bit 1 = framed spix support is enabled (ssx pin is used as frame sync pulse input/output) 0 = framed spix support disabled bit 14 spifsd: frame sync pulse direction control bit 1 = frame sync pulse input (slave) 0 = frame sync pulse output (master) bit 13 frmpol: frame sync pulse polarity bit 1 = frame sync pulse is active-high 0 = frame sync pulse is active-low bit 12-2 unimplemented: read as ? 0 ? bit 1 frmdly: frame sync pulse edge select bit 1 = frame sync pulse coincides with first bit clock 0 = frame sync pulse precedes first bit clock bit 0 unimplemented: this bit must not be set to ? 1 ? by the user application
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 266 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 267 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 19.0 inter-integ rated circuit (i 2 c?) the inter-integrated circuit (i 2 c) module provides complete hardware support for both slave and multi-master modes of the i 2 c serial communication standard with a 16-bit interface. the i 2 c module has a 2-pin interface: ? the sclx pin is clock. ? the sdax pin is data. the i 2 c module offers the following key features: ?i 2 c interface supporting both master and slave modes of operation ?i 2 c slave mode supports 7-bit and 10-bit addressing ?i 2 c master mode supports 7-bit and 10-bit addressing ?i 2 c port allows bidirectional transfers between master and slaves ? serial clock synchronization for i 2 c port can be used as a handshake mechanism to suspend and resume serial transfer (sclrel control) ?i 2 c supports multi-master operation, detects bus collision and arbitrates accordingly 19.1 operating modes the hardware fully implements all the master and slave functions of the i 2 c standard and fast mode specifications, as well as 7-bit and 10-bit addressing. the i 2 c module can operate either as a slave or a master on an i 2 c bus. the following types of i 2 c operation are supported: ?i 2 c slave operation with 7-bit addressing ?i 2 c slave operation with 10-bit addressing ?i 2 c master operation with 7-bit or 10-bit addressing for details about the communication sequence in each of these modes, refer to the ? dspic33f/pic24h family reference manual ?. please see the microchip web site ( www.microchip.com ) for the latest ?dspic33f/pic24h family reference manual ? sections. 19.2 i 2 c registers i2cxcon and i2cxstat are control and status registers, respectively. the i2cxcon register is readable and writable. the lower six bits of i2cxstat are read-only. the remaining bits of the i2cstat are read/write: ? i2cxrsr is the shift register used for shifting data internal to the module and the user application has no access to it. ? i2cxrcv is the receive buffer and the register to which data bytes are written or from which data bytes are read. ? i2cxtrn is the transmit register to which bytes are written during a transmit operation. ? the i2cxadd register holds the slave address. ? a status bit, add10, indicates 10-bit addressing mode. ? the i2cxbrg acts as the baud rate generator (brg) reload value. in receive operations, i2cxrsr and i2cxrcv together form a double-buffered receiver. when i2cxrsr receives a complete byte, it is transferred to i2cxrcv and an interrupt pulse is generated. note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 19. ?inter-integrated circuit (i 2 c?)? (ds70195) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 268 ? 2009-2012 microchip technology inc. figure 19-1: i 2 c? block diagram ( x = 1 or 2) internal data bus sclx sdax shift match detect start and stop bit detect clock address match clock stretching i2cxtrn lsb shift clock brg down counter reload control t cy /2 start and stop bit generation acknowledge generation collision detect i2cxcon i2cxstat control logic read lsb write read i2cxbrg i2cxrsr write read write read write read write read write read i2cxrcv i2cxadd i2cxmsk
? 2009-2012 microchip technology inc. ds70591e-page 269 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 19-1: i2cxcon: i2cx control register r/w-0 u-0 r/w-0 r/w-1, hc r/w-0 r/w-0 r/w-0 r/w-0 i2cen ? i2csidl sclrel ipmien a10m disslw smen bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0, hc r/w-0, hc r/w-0, hc r/w-0, hc r/w-0, hc gcen stren ackdt acken rcen pen rsen sen bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 i2cen: i2cx enable bit 1 = enables the i2cx module and configures the sdax and sclx pins as serial port pins 0 = disables the i2cx module; all i 2 c pins are controlled by port functions bit 14 unimplemented: read as ? 0 ? bit 13 i2csidl: i2cx stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 sclrel: sclx release control bit (when operating as i 2 c slave) 1 = releases sclx clock 0 = holds sclx clock low (clock stretch) if stren = 1 : bit is r/w (i.e., software can write ? 0 ? to initiate stretch and write ? 1 ? to release clock). hardware is clear at beginning of slave transmission. hardwa re is clear at end of slave reception. if stren = 0 : bit is r/s (i.e., software can only write ? 1 ? to release clock). hardware is clear at beginning of slave transmission. bit 11 ipmien: intelligent peripheral management interface (ipmi) enable bit 1 = ipmi mode is enabled; all addresses are acknowledged 0 = ipmi mode is disabled bit 10 a10m: 10-bit slave address bit 1 = i2cxadd is a 10-bit slave address 0 = i2cxadd is a 7-bit slave address bit 9 disslw: disable slew rate control bit 1 = slew rate control is disabled 0 = slew rate control is enabled bit 8 smen: smbus input levels bit 1 = enables i/o pin thresholds compliant with smbus specification 0 = disables smbus input thresholds bit 7 gcen: general call enable bit (when operating as i 2 c slave) 1 = enables interrupt when a general call address is received in the i2cxrsr (module is enabled for reception) 0 = general call address is disabled bit 6 stren: sclx clock stretch enable bit (when operating as i 2 c slave) used in conjunction with the sclrel bit. 1 = enables software or receives clock stretching 0 = disables software or receives clock stretching
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 270 ? 2009-2012 microchip technology inc. bit 5 ackdt: acknowledge data bit (when operating as i 2 c master, applicable during master receive) value that is transmitted when the software initiates an acknowledge sequence. 1 = sends nack during acknowledge 0 = sends ack during acknowledge bit 4 acken: acknowledge sequence enable bit (when operating as i 2 c master, applicable during master receive) 1 = initiates acknowledge sequence on sdax and sclx pins and transmits ackdt data bit. hardware clears at the end of the master acknowledge sequence. 0 = acknowledge sequence is not in progress bit 3 rcen: receive enable bit (when operating as i 2 c master) 1 = enables receive mode for i 2 c. hardware clears at the end of the eighth bit of the master receive data byte. 0 = receive sequence is not in progress bit 2 pen: stop condition enable bit (when operating as i 2 c master) 1 = initiates stop condition on sdax and sclx pins . hardware clears at the end of the master stop sequence. 0 = stop condition is not in progress bit 1 rsen: repeated start condition enable bit (when operating as i 2 c master) 1 = initiates repeated start condition on sdax and sclx pins. hardware clears at the end of the master repeated start sequence. 0 = repeated start condition is not in progress bit 0 sen: start condition enable bit (when operating as i 2 c master) 1 = initiates start condition on sdax and sclx pins . hardware clears at the end of the master start sequence. 0 = start condition is not in progress register 19-1: i2cxcon: i2cx control register (continued)
? 2009-2012 microchip technology inc. ds70591e-page 271 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 19-2: i2cxstat: i2cx status register r-0, hsc r-0, hsc u-0 u-0 u-0 r/c-0, hsc r-0, hsc r-0, hsc ackstat trstat ? ? ? bcl gcstat add10 bit 15 bit 8 r/c-0, hs r/c-0, hs r-0, hsc r/c-0, hsc r/c-0, hsc r-0, hsc r-0, hsc r-0, hsc iwcol i2cov d_a p s r_w rbf tbf bit 7 bit 0 legend: c = clearable bit u = unimplemented bit, read as ?0? r = readable bit w = writable bit hs = hardware settable bit hsc = hardware settable/clearable bit -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 ackstat: acknowledge status bit (when operating as i 2 c master, applicable to master transmit operation) 1 = nack received from slave 0 = ack received from slave hardware is set or clear at the end of slave acknowledge. bit 14 trstat: transmit status bit (when operating as i 2 c master, applicable to master transmit operation) 1 = master transmit is in progress (8 bits + ack) 0 = master transmit is not in progress hardware is set at the beginning of master transmissi on. hardware is clear at the end of slave acknowledge. bit 13-11 unimplemented: read as ? 0 ? bit 10 bcl: master bus collision detect bit 1 = a bus collision has been detected during a master operation 0 = no collision hardware set at detection of bus collision. bit 9 gcstat: general call status bit 1 = general call address was received 0 = general call address was not received hardware is set when the address matches the general call address. hardware is clear at stop detection. bit 8 add10: 10-bit address status bit 1 = 10-bit address was matched 0 = 10-bit address was not matched hardware is set at the match of the 2nd byte of matc hed 10-bit address. hardware is clear at stop detection. bit 7 iwcol: write collision detect bit 1 = an attempt to write to the i2 cxtrn register failed because the i 2 c module is busy 0 = no collision hardware is set at the occurrence of a write to i2cxtrn while busy (cleared by software). bit 6 i2cov: receive overflow flag bit 1 = a byte was received while the i2cxrcv r egister is still holding the previous byte 0 = no overflow hardware is set at an attempt to transfer i2cxrsr to i2cxrcv (cleared by software). bit 5 d_a: data/address bit (when operating as i 2 c slave) 1 = indicates that the last byte received was data 0 = indicates that the last byte received was a device address hardware is clear at a device address match. hardware is set by reception of a slave byte. bit 4 p: stop bit 1 = indicates that a stop bit has been detected last 0 = stop bit was not detected last hardware is set or clear when star t, repeated start or stop is detected.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 272 ? 2009-2012 microchip technology inc. bit 3 s: start bit 1 = indicates that a start (or repeat ed start) bit has been detected last 0 = start bit was not detected last hardware is set or clear when star t, repeated start or stop is detected. bit 2 r_w: read/write information bit (when operating as i 2 c slave) 1 = read ? indicates data transfer is output from slave 0 = write ? indicates data transfer is input to slave hardware is set or clear after reception of an i 2 c device address byte. bit 1 rbf: receive buffer full status bit 1 = receive is complete, i2cxrcv is full 0 = receive is not complete, i2cxrcv is empty hardware is set when i2cxrcv is written with a received byte. hardware is clear when software reads i2cxrcv. bit 0 tbf: transmit buffer full status bit 1 = transmit in progress, i2cxtrn is full 0 = transmit is complete, i2cxtrn is empty hardware is set when software writes to i2cxtrn. ha rdware is clear at completion of the data transmission. register 19-2: i2cxstat: i2cx status register (continued)
? 2009-2012 microchip technology inc. ds70591e-page 273 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 19-3: i2cxmsk: i2cx sl ave mode address mask register u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 ? ? ? ? ? ? amsk<9:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 amsk<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-10 unimplemented: read as ? 0 ? bit 9-0 amsk<9:0>: mask for address bit x select bits 1 = enables masking for bit x of incoming message address; bit match is not required in this position 0 = disables masking for bit x; bit match is required in this position
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 274 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 275 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 20.0 universal asynchronous receiver transmitter (uart) the universal asynchronous receiver transmitter (uart) module is one of the serial i/o modules available in the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 device families. the uart is a full-duplex, asyn chronous system that can communicate with peripheral devices, such as personal computers, lin/js2602, rs-232 and rs-485 interfaces. the module also supports a hardware flow control option with the uxcts and uxrts pins and also includes an irda encoder and decoder. the primary features of the uartx module are: ? full-duplex, 8-bit or 9-bit data transmission through the uxtx and uxrx pins ? even, odd or no parity options (for 8-bit data) ? one or two stop bits ? hardware flow control option with uxcts and uxrts pins ? fully integrated baud rate generator with 16-bit prescaler ? baud rates ranging from 10 mbps to 38 bps at 40 mips ? baud rates ranging from 12.5 mbps to 47 bps at 50 mips ? 4-deep, first-in first-out (fifo) transmit data buffer ? 4-deep fifo receive data buffer ? parity, framing and buffer overrun error detection ? support for 9-bit mode with address detect (9th bit = 1 ) ? transmit and receive interrupts ? a separate interrupt for all uart error conditions ? loopback mode for diagnostic support ? support for sync and break characters ? support for automatic baud rate detection ? irda encoder and decoder logic ? 16x baud clock output for irda ? support ? support for dma a simplified block diagram of the uart module is shown in figure 20-1 . the uart module consists of these key hardware elements: ? baud rate generator ? asynchronous transmitter ? asynchronous receiver figure 20-1: simplified uartx block diagram note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 17. ?uart? (ds70188) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. uxrx hardware flow control uartx receiver uartx transmitter uxtx baud rate generator uxrts /bclk irda ? uxcts
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 276 ? 2009-2012 microchip technology inc. register 20-1: uxmode: uart x mode register r/w-0 u-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 uarten ( 1 ) ? usidl iren ( 2 ) rtsmd ?uen<1:0> bit 15 bit 8 r/w-0, hc r/w-0 r/w-0, hc r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 wake lpback abaud urxinv brgh pdsel<1:0> stsel bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 uarten: uartx enable bit ( 1 ) 1 = uartx is enabled; all uartx pins are controlled by uartx as defined by uen<1:0> 0 = uartx is disabled; all uartx pins are controlle d by port latches; uartx power consumption minimal bit 14 unimplemented: read as ? 0 ? bit 13 usidl: uartx stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 iren: irda ? encoder and decoder enable bit ( 2 ) 1 = irda encoder and decoder are enabled 0 = irda encoder and decoder are disabled bit 11 rtsmd: mode selection for uxrts pin bit 1 =uxrts pin in simplex mode 0 =uxrts pin in flow control mode bit 10 unimplemented: read as ? 0 ? bit 9-8 uen<1:0>: uartx pin enable bits 11 = uxtx, uxrx and bclk pins are enabled and used; uxcts pin is controlled by port latches 10 = uxtx, uxrx, uxcts and uxrts pins are enabled and used 01 = uxtx, uxrx and uxrts pins are enabled and used; uxcts pin is controlled by port latches 00 = uxtx and uxrx pins are enabled and used; uxcts and uxrts /bclk pins are controlled by port latches bit 7 wake: wake-up on start bit detect during sleep mode enable bit 1 = uartx will continue to sample the uxrx pin; interrupt is generated on falling edge; bit is cleared in hardware on following rising edge 0 = no wake-up is enabled bit 6 lpback: uartx loopback mode select bit 1 = enables loopback mode 0 = loopback mode is disabled bit 5 abaud: auto-baud enable bit 1 = enables baud rate measurement on the next character ? requires reception of a sync field (55h) before other data; cleared in hardware upon completion 0 = baud rate measurement is disabled or completed note 1: refer to section 17. ?uart? (ds70188) in the ?dspic33f/pic24h family reference manual? for information on enabling the uart module for receive or transmit operation. that section of the manual is available on the microchip web site, www.microchip.com . 2: this feature is only available for the 16x brg mode (brgh = 0 ).
? 2009-2012 microchip technology inc. ds70591e-page 277 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 4 urxinv: receive polarity inversion bit 1 = uxrx idle state is ? 0 ? 0 = uxrx idle state is ? 1 ? bit 3 brgh: high baud rate enable bit 1 = brg generates 4 clocks per bit period (4x baud clock, high-speed mode) 0 = brg generates 16 clocks per bit period (16x baud clock, standard mode) bit 2-1 pdsel<1:0>: parity and data selection bits 11 = 9-bit data, no parity 10 = 8-bit data, odd parity 01 = 8-bit data, even parity 00 = 8-bit data, no parity bit 0 stsel: stop bit selection bit 1 = two stop bits 0 = one stop bit register 20-1: uxmode: uart x mode register (continued) note 1: refer to section 17. ?uart? (ds70188) in the ?dspic33f/pic24h family reference manual? for information on enabling the uart module for receive or transmit operation. that section of the manual is available on the microchip web site, www.microchip.com . 2: this feature is only available for the 16x brg mode (brgh = 0 ).
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 278 ? 2009-2012 microchip technology inc. register 20-2: u x sta: uart x status and control register r/w-0 r/w-0 r/w-0 u-0 r/w-0, hc r/w-0 r-0 r-1 utxisel1 utxinv utxisel0 ? utxbrk utxen ( 1 ) utxbf trmt bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-1 r-0 r-0 r/c-0 r-0 urxisel<1:0> adden ridle perr ferr oerr urxda bit 7 bit 0 legend: hc = hardware clearable bit c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15,13 utxisel<1:0>: uartx transmission interrupt mode selection bits 11 = reserved; do not use 10 = interrupt when a character is transferred to th e transmit shift register (tsr), and as a result, the transmit buffer becomes empty 01 = interrupt when the last character is shifted out of the transmit shift register; all transmit operations are completed 00 = interrupt when a character is transferred to the transmit shift register (this implies there is at least one character open in the transmit buffer) bit 14 utxinv: uartx transmit polarity inversion bit if iren = 0 : 1 = uxtx idle state is ? 0 ? 0 = uxtx idle state is ? 1 ? if iren = 1 : 1 =irda ? encoded uxtx idle state is ? 1 ? 0 = irda encoded uxtx idle state is ? 0 ? bit 12 unimplemented: read as ? 0 ? bit 11 utxbrk: uartx transmit break bit 1 = sends sync break on next transmission ? start bit, followed by twelve ? 0 ? bits, followed by stop bit; cleared by hardware upon completion 0 = sync break transmission is disabled or completed bit 10 utxen: uartx transmit enable bit ( 1 ) 1 = transmit is enabled, uxtx pin is controlled by uartx 0 = transmit is disabled, any pending transmission is aborted and the buffer is reset; uxtx pin is controlled by the port bit 9 utxbf: uartx transmit buffer full status bit (read-only) 1 = transmit buffer is full 0 = transmit buffer is not full; at least one more character can be written bit 8 trmt: transmit shift register empty bit (read-only) 1 = transmit shift register is empty and transmit buf fer is empty (the last transmission has completed) 0 = transmit shift register is not empty, a transmission is in progress or queued bit 7-6 urxisel<1:0>: uartx receive interrupt mode selection bits 11 = interrupt is set on uxrsr transfer, making th e receive buffer full (i.e., has 4 data characters) 10 = interrupt is set on uxrsr transfer, making the rece ive buffer 3/4 full (i.e., has 3 data characters) 0x = interrupt is set when any character is rece ived and transferred from the uxrsr to the receive buffer; receive buffer has one or more characters note 1: refer to section 17. ?uart? (ds70188) in the ?dspic33f/pic24h family reference manual? for information on enabling the uart module for transmit oper ation. that section of the manual is available on the microchip web site, www.microchip.com .
? 2009-2012 microchip technology inc. ds70591e-page 279 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 5 adden: address character detect bit (bit 8 of received data = 1 ) 1 = address detect mode is enabled; if 9-bit m ode is not selected, this does not take effect 0 = address detect mode is disabled bit 4 ridle: receiver idle bit (read-only) 1 = receiver is idle 0 = receiver is active bit 3 perr: parity error status bit (read-only) 1 = parity error has been detected for the current char acter (character at the top of the receive fifo) 0 = parity error has not been detected bit 2 ferr: framing error status bit (read-only) 1 = framing error has been detected for the current character (character at the top of the receive fifo) 0 = framing error has not been detected bit 1 oerr: receive buffer overrun error status bit (clear/read-only) 1 = receive buffer has overflowed 0 = receive buffer has not overflowed; clearing a previously set oerr bit ( 1 ? 0 transition) will reset the receiver buffer and t he uxrsr to the empty state bit 0 urxda: uartx receive buffer data available bit (read-only) 1 = receive buffer has data, at least one more character can be read 0 = receive buffer is empty register 20-2: u x sta: uart x status and control register (continued) note 1: refer to section 17. ?uart? (ds70188) in the ?dspic33f/pic24h family reference manual? for information on enabling the uart module for transmit operation. that section of the manual is available on the microchip web site, www.microchip.com .
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 280 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 281 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 21.0 enhanced can (ecan?) module 21.1 overview the enhanced controller area network (ecan?) module is a serial interface, useful for communicating with other can modules or microcontroller devices. this inter- face/protocol was designed to allow communications within noisy environments. the dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 devices contain up to two ecan modules. the ecan module is a communication controller imple- menting the can 2.0 a/b protocol, as defined in the bosch can specificatio n. the module supports can 1.2, can 2.0a, can 2.0b passive and can 2.0b active versions of the protocol. the module implementa- tion is a full can system. the can specification is not covered within this data sheet. the reader can refer to the bosch can specificat ion for further details. the module features are as follows: ? implementation of the can protocol, can 1.2, can 2.0a and can 2.0b ? standard and extended data frames ? 0-8 bytes data length ? programmable bit rate, up to 1 mbit/sec ? automatic response to remote transmission requests ? up to 8 transmit buffers wi th application-specified prioritization and abort capability (each buffer can contain up to 8 bytes of data) ? up to 32 receive buffers (each buffer can contain up to 8 bytes of data) ? up to 16 full (standard/extended identifier) acceptance filters ? three full acceptance filter masks ? devicenet? addressing support ? programmable wake-up functionality with integrated low-pass filter ? programmable loopback mode supports self-test operation ? signaling via interrupt capabilities for all can receiver and transmitter error states ? programmable clock source ? programmable link to input capture module (ic2 for can1) for time-stamping and network synchronization ? low-power sleep and idle mode the can bus module consists of a protocol engine and message buffering/control. the can protocol engine handles all functions for receiving and transmitting messages on the can bus. messages are transmitted by first loading the appropriate data registers. status and errors can be checked by reading the appropriate registers. any message detected on the can bus is checked for errors and then matched against filters to see if it should be received and stored in one of the receive registers. 21.2 frame types the ecan module transmits various types of frames which include data messages, or remote transmission requests initiated by the user, as other frames that are automatically generated for control purposes. the following frame types are supported: ? standard data frame: a standard data frame is generated by a node when the node wishes to transmit data. it includes an 11-bit standard identifier (sid), but not an 18-bit extended identifier (eid). ? extended data frame: an extended data frame is similar to a standard data frame, but includes an extended identifier as well. ? remote frame: it is possible for a destination node to request the data from the source. for this purpose, the destination node sends a remote frame with an identifier t hat matches the identifier of the required data frame. the appropriate data source node sends a data frame as a response to this remote request. ? error frame: an error frame is generated by any node that detects a bus error. an error frame con- sists of two fields: an error flag field and an error delimiter field. ? overload frame: an overload frame can be gen- erated by a node as a result of two conditions. first, the node detects a dominant bit during inter- frame space which is an illegal condition. second, due to internal conditions, the node is not yet able to start reception of the next message. a node can generate a maximum of 2 sequential overload frames to delay the start of the next message. ? interframe space: interframe space separates a proceeding frame (of whatever type) from a following data or remote frame. note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 21. ?enhanced controller area network (ecan?)? (ds70185) in the dspic33f/pic24h family reference manual , which is avail- able from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 282 ? 2009-2012 microchip technology inc. figure 21-1: ecanx module block diagram can protocol engine c1tx c1rx rxf14 filter rxf13 filter rxf12 filter rxf11 filter rxf10 filter rxf9 filter rxf8 filter rxf7 filter rxf6 filter rxf5 filter rxf4 filter rxf3 filter rxf2 filter rxf1 filter rxf0 filter rxm1 mask rxm0 mask control configuration logic cpu bus interrupts trb0 tx/rx buffer control register dma controller rxf15 filter rxm2 mask trb7 tx/rx buffer control register trb6 tx/rx buffer control register trb5 tx/rx buffer control register trb4 tx/rx buffer control register trb3 tx/rx buffer control register trb2 tx/rx buffer control register trb1 tx/rx buffer control register message assembly buffer transmit byte sequencer
? 2009-2012 microchip technology inc. ds70591e-page 283 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 21.3 modes of operation the ecan? module can operate in one of several operation modes selected by the user. these modes include: ? initialization mode ? disable mode ? normal operation mode ? listen only mode ? listen all messages mode ? loopback mode modes are requested by setting the reqop<2:0> bits (cxctrl1<10:8>). entry in to a mode is acknowledged by monitoring the opmode<2:0> bits (cxctrl1<7:5>). the module does not change the mode and the opmode bits until a change in mode is acceptable, generally during bus idle time, which is defined as at least 11 consecutive recessive bits. 21.3.1 initialization mode in the initialization mode, the module does not transmit or receive. the error counters are cleared and the inter- rupt flags remain unchanged. the user application has access to configuration registers that are access restricted in other modes. the module protects the user from accidentally violati ng the can protocol through programming errors. all registers which control the configuration of the module cannot be modified while the module is on-line. the ecan module is not allowed to enter the configuration mode while a transmission is taking place. the configuration mode serves as a lock to protect the following registers: ? all module control registers ? baud rate and interrupt configuration registers ? bus timing registers ? identifier acceptance filter registers ? identifier acceptance mask registers 21.3.2 disable mode in disable mode, the module does not transmit or receive. the module has the ability to set the wakif bit due to bus activity, however, any pending interrupts remain and the error counters retains their value. if the reqop<2:0> bi ts (cxctrl1<10:8>) = 001 , the module enters the module di sable mode. if the module is active, the module waits for 11 recessive bits on the can bus, detects that condition as an idle bus, then accepts the module disable command. when the opmode<2:0> bits (cxctrl1<7:5>) = 001 , that indicates whether the module successfully went into module disable mode. the i/o pins revert to normal i/o function when the module is in the module disable mode. the module can be programmed to apply a low-pass filter function to the cxrx input line while the module or the cpu is in sleep mode. the wakfil bit (cxcfg2<14>) enables or disables the filter. 21.3.3 normal operation mode normal operation mode is selected when reqop<2:0> = 000 . in this mode, the module is activated and the i/o pins assume the can bus functions. the module transmits and receives can bus messages via the cxtx and cxrx pins. 21.3.4 listen only mode if the listen only mode is activated, the module on the can bus is passive. the tran smitter buffers revert to the port i/o function. the receive pins remain inputs. for the receiver, no error flags or acknowledge signals are sent. the error counters are deactivated in this state. the listen only mode can be used for detecting the baud rate on the can bus. to use this, it is neces- sary that there are at least two further nodes that communicate with each other. 21.3.5 listen all messages mode the module can be set to ignore all errors and receive any message. the listen all messages mode is acti- vated by setting reqop<2:0> = 111 . in this mode, the data, which is in the message assembly buffer until the time an error occurred, is copied in the receive buffer and can be read via the cpu interface. 21.3.6 loopback mode if the loopback mode is activated, the module con- nects the internal transmit signal to the internal receive signal at the module boundary. the transmit and receive pins revert to their port i/o function. note: typically, if the ecan module is allowed to transmit in a particular mode of operation, and a transmission is requested immedi- ately after the ecan module has been placed in that mode of operation, the mod- ule waits for 11 consecutive recessive bits on the bus before starting transmission. if the user switches to disable mode within this 11-bit period, then this transmission is aborted and the co rresponding txabtmn bit is set and the txreqmn bit is cleared.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 284 ? 2009-2012 microchip technology inc. register 21-1: cxctrl1: ecanx control register 1 u-0 u-0 r/w-0 r/w-0 r-0 r/w-1 r/w-0 r/w-0 ? ? csidl abat r reqop<2:0> bit 15 bit 8 r-1 r-0 r-0 u-0 r/w-0 u-0 u-0 r/w-0 opmode<2:0> ?cancap ? ?win bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as ? 0 ? bit 13 csidl: ecanx stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 abat: abort all pending transmissions bit 1 = signals all transmit buffers to abort transmission 0 = module will clear this bit when all transmissions are aborted bit 11 reserved: do not use bit 10-8 reqop<2:0>: request operation mode bits 111 = sets listen all messages mode 110 = reserved 101 = reserved 100 = sets configuration mode 011 = sets listen only mode 010 = sets loopback mode 001 = sets disable mode 000 = sets normal operation mode bit 7-5 opmode<2:0>: operation mode bits 111 = module is in listen all messages mode 110 = reserved 101 = reserved 100 = module is in configuration mode 011 = module is in listen only mode 010 = module is in loopback mode 001 = module is in disable mode 000 = module is in normal operation mode bit 4 unimplemented: read as ? 0 ? bit 3 cancap: can message receive timer capture event enable bit 1 = enables input capture based on can message receive 0 = disables can capture bit 2-1 unimplemented: read as ? 0 ? bit 0 win: sfr map window select bit 1 = use filter window 0 = use buffer window
? 2009-2012 microchip technology inc. ds70591e-page 285 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-2: cxctrl2: ecanx control register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 ? ? ? dncnt<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-5 unimplemented: read as ? 0 ? bit 4-0 dncnt<4:0>: devicenet? filter bit number bits 10010-11111 = invalid selection 10001 = compares up to data byte 3, bit 6 with eid<17> ? ? ? 00001 = compares up to data byte 1, bit 7 with eid<0> 00000 = does not compare data bytes
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 286 ? 2009-2012 microchip technology inc. register 21-3: cxvec: ecanx interrupt code register u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 ? ? ? filhit<4:0> bit 15 bit 8 u-0 r-1 r-0 r-0 r-0 r-0 r-0 r-0 ?icode<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 12-8 filhit<4:0>: filter hit number bits 10000-11111 = reserved 01111 = filter 15 ? ? ? 00001 = filter 1 00000 = filter 0 bit 7 unimplemented: read as ? 0 ? bit 6-0 icode<6:0>: interrupt flag code bits 1000101-1111111 = reserved 1000100 = fifo almost full interrupt 1000011 = receiver overflow interrupt 1000010 = wake-up interrupt 1000001 = error interrupt 1000000 = no interrupt ? ? ? 0010000-0111111 = reserved 0001111 = rb15 buffer interrupt ? ? ? 0001001 = rb9 buffer interrupt 0001000 = rb8 buffer interrupt 0000111 = trb7 buffer interrupt 0000110 = trb6 buffer interrupt 0000101 = trb5 buffer interrupt 0000100 = trb4 buffer interrupt 0000011 = trb3 buffer interrupt 0000010 = trb2 buffer interrupt 0000001 = trb1 buffer interrupt 0000000 = trb0 buffer interrupt
? 2009-2012 microchip technology inc. ds70591e-page 287 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-4: cxfctrl: e canx fifo control register r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 dmabs<2:0> ? ? ? ? ? bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? ? fsa<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 dmabs<2:0>: dma buffer size bits 111 = reserved 110 = 32 buffers in dma ram 101 = 24 buffers in dma ram 100 = 16 buffers in dma ram 011 = 12 buffers in dma ram 010 = 8 buffers in dma ram 001 = 6 buffers in dma ram 000 = 4 buffers in dma ram bit 12-5 unimplemented: read as ? 0 ? bit 4-0 fsa<4:0>: fifo area starts with buffer bits 11111 = reads buffer rb31 11110 = reads buffer rb30 ? ? ? 00001 = tx/rx buffer trb1 00000 = tx/rx buffer trb0
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 288 ? 2009-2012 microchip technology inc. register 21-5: cxfifo: ecanx fifo status register u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 ? ? fbp<5:0> bit 15 bit 8 u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 ? ? fnrb<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as ? 0 ? bit 13-8 fbp<5:0>: fifo buffer pointer bits 011111 = rb31 buffer 011110 = rb30 buffer ? ? ? 000001 = trb1 buffer 000000 = trb0 buffer bit 7-6 unimplemented: read as ? 0 ? bit 5-0 fnrb<5:0>: fifo next read buffer pointer bits 011111 = rb31 buffer 011110 = rb30 buffer ? ? ? 000001 = trb1 buffer 000000 = trb0 buffer
? 2009-2012 microchip technology inc. ds70591e-page 289 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-6: cxintf: ecanx interrupt flag register u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 ? ? txbo txbp rxbp txwar rxwar ewarn bit 15 bit 8 r/c-0 r/c-0 r/c-0 u-0 r/c-0 r/c-0 r/c-0 r/c-0 ivrif wakif errif ? fifoif rbovif rbif tbif bit 7 bit 0 legend: c = writeable, but only ?0? can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as ? 0 ? bit 13 txbo: transmitter in error state bus off bit 1 = transmitter is in bus off state 0 = transmitter is not in bus off state bit 12 txbp: transmitter in error state bus passive bit 1 = transmitter is in bus passive state 0 = transmitter is not in bus passive state bit 11 rxbp: receiver in error state bus passive bit 1 = receiver is in bus passive state 0 = receiver is not in bus passive state bit 10 txwar: transmitter in error state warning bit 1 = transmitter is in error warning state 0 = transmitter is not in error warning state bit 9 rxwar: receiver in error state warning bit 1 = receiver is in error warning state 0 = receiver is not in error warning state bit 8 ewarn: transmitter or receiver in error state warning bit 1 = transmitter or receiver is in error warning state 0 = transmitter or receiver is not in error warning state bit 7 ivrif: invalid message received interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 6 wakif: bus wake-up activity interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5 errif: error interrupt flag bit (multiple sources in cxintf<13:8> register) 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4 unimplemented: read as ? 0 ? bit 3 fifoif: fifo almost full interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 rbovif: rx buffer overflow interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 290 ? 2009-2012 microchip technology inc. bit 1 rbif: rx buffer interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 tbif: tx buffer interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred register 21-6: cxintf: ecanx interrupt flag register (continued)
? 2009-2012 microchip technology inc. ds70591e-page 291 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-7: cxinte: ecanx interrupt enable register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ivrie wakie errie ? fifoie rbovie rbie tbie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as ? 0 ? bit 7 ivrie: invalid message received interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 6 wakie: bus wake-up activity interrupt flag bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 5 errie: error interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 4 unimplemented: read as ? 0 ? bit 3 fifoie: fifo almost full interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 2 rbovie: rx buffer overflow interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 1 rbie: rx buffer interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 0 tbie: tx buffer interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 292 ? 2009-2012 microchip technology inc. register 21-8: cxec: ecanx trans mit/receive error count register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 terrcnt<7:0> bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 rerrcnt<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 terrcnt<7:0>: transmit error count bits bit 7-0 rerrcnt<7:0>: receive error count bits register 21-9: cxcfg1: ecanx baud rate configuration register 1 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sjw<1:0> brp<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as ? 0 ? bit 7-6 sjw<1:0>: synchronization jump width bits 11 = length is 4 x t q 10 = length is 3 x t q 01 = length is 2 x t q 00 = length is 1 x t q bit 5-0 brp<5:0>: baud rate prescaler bits 11 1111 = t q = 2 x 64 x 1/f can ? ? ? 00 0010 = t q = 2 x 3 x 1/f can 00 0001 = t q = 2 x 2 x 1/f can 00 0000 = t q = 2 x 1 x 1/f can
? 2009-2012 microchip technology inc. ds70591e-page 293 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-10: cxcfg2: ecanx baud rate configuration register 2 u-0 r/w-x u-0 u-0 u-0 r/w-x r/w-x r/w-x ? wakfil ? ? ? seg2ph<2:0> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x seg2phts sam seg1ph <2:0> prseg<2:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 unimplemented: read as ? 0 ? bit 14 wakfil: select can bus line filter for wake-up bit 1 = uses can bus line filter for wake-up 0 = can bus line filter is not used for wake-up bit 13-11 unimplemented: read as ? 0 ? bit 10-8 seg2ph<2:0>: phase segment 2 bits 111 = length is 8 x t q ? ? ? 000 = length is 1 x t q bit 7 seg2phts: phase segment 2 time select bit 1 = freely programmable 0 = maximum of seg1ph bits or information pr ocessing time (ipt), whichever is greater bit 6 sam: sample of the can bus line bit 1 = bus line is sampled three times at the sample point 0 = bus line is sampled once at the sample point bit 5-3 seg1ph<2:0>: phase segment 1 bits 111 = length is 8 x t q ? ? ? 000 = length is 1 x t q bit 2-0 prseg<2:0>: propagation time segment bits 111 = length is 8 x t q ? ? ? 000 = length is 1 x t q
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 294 ? 2009-2012 microchip technology inc. register 21-11: cxfen1: ecanx accept ance filter enable register 1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 flten15 flten14 flten13 flten12 flten11 flten10 flten9 flten8 bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 flten7 flten6 flten5 flten4 flten3 flten2 flten1 flten0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 flten<15:0>: enable filter n to accept messages bits 1 = enables filter n 0 = disables filter n register 21-12: cxbufpnt1: ecanx filt er 0-3 buffer pointer register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f3bp<3:0> f2bp<3:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f1bp<3:0> f0bp<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 f3bp<3:0>: rx buffer mask for filter 3 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 ? ? ? 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f2bp<3:0>: rx buffer mask for filter 2 bits (same values as bit 15-12) bit 7-4 f1bp<3:0>: rx buffer mask for filter 1 bits (same values as bit 15-12) bit 3-0 f0bp<3:0>: rx buffer mask for filter 0 bits (same values as bit 15-12)
? 2009-2012 microchip technology inc. ds70591e-page 295 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-13: cxbufpnt2: ecanx filt er 4-7 buffer pointer register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f7bp<3:0> f6bp<3:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f5bp<3:0> f4bp<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 f7bp<3:0>: rx buffer mask for filter 7 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 ? ? ? 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f6bp<3:0>: rx buffer mask for filter 6 bits (same values as bit 15-12) bit 7-4 f5bp<3:0>: rx buffer mask for filter 5 bits (same values as bit 15-12) bit 3-0 f4bp<3:0>: rx buffer mask for filter 4 bits (same values as bit 15-12)
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 296 ? 2009-2012 microchip technology inc. register 21-14: cxbufpnt3: ecanx filter 8-11 buffer pointer register 3 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f11bp<3:0> f10bp<3:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f9bp<3:0> f8bp<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 f11bp<3:0>: rx buffer mask for filter 11 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 ? ? ? 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f10bp<3:0>: rx buffer mask for filter 10 bits (same values as bit 15-12) bit 7-4 f9bp<3:0>: rx buffer mask for filter 9 bits (same values as bit 15-12) bit 3-0 f8bp<3:0>: rx buffer mask for filter 8 bits (same values as bit 15-12)
? 2009-2012 microchip technology inc. ds70591e-page 297 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-15: cxbufpnt4: ecanx filter 12-15 buffer pointer register 4 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f15bp<3:0> f14bp<3:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f13bp<3:0> f12bp<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 f15bp<3:0>: rx buffer mask for filter 15 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 ? ? ? 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f14bp<3:0>: rx buffer mask for filter 14 bits (same values as bit 15-12) bit 7-4 f13bp<3:0>: rx buffer mask for filter 13 bits (same values as bit 15-12) bit 3-0 f12bp<3:0>: rx buffer mask for filter 12 bits (same values as bit 15-12)
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 298 ? 2009-2012 microchip technology inc. register 21-16: cxrxfnsid: ecanx acceptance filter n standard identifier register (n = 0-15) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 bit 15 bit 8 r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 ?exide ?eid17eid16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-5 sid<10:0>: standard identifier bits 1 = message address bit, sidx, must be ? 1 ? to match filter 0 = message address bit, sidx, must be ? 0 ? to match filter bit 4 unimplemented: read as ? 0 ? bit 3 exide: extended identifier enable bit if mide = 1 , then: 1 = matches only messages with extended identifier addresses 0 = matches only messages with standard identifier addresses if mide = 0 , then: ignores exide bit. bit 2 unimplemented: read as ? 0 ? bit 1-0 eid<17:16>: extended identifier bits 1 = message address bit, eidx, must be ? 1 ? to match filter 0 = message address bit, eidx, must be ? 0 ? to match filter
? 2009-2012 microchip technology inc. ds70591e-page 299 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-17: cxrxfneid: ecanx accept ance filter n extended identifier register (n = 0-15) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 eid<15:0>: extended identifier bits 1 = message address bit, eidx, must be ? 1 ? to match filter 0 = message address bit, eidx, must be ? 0 ? to match filter register 21-18: cxfmsksel1: ecan x filter 7-0 mask selection register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f7msk<1:0> f6msk<1:0> f5msk<1:0> f4msk<1:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f3msk<1:0> f2msk<1:0> f1msk<1:0> f0msk<1:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 f7msk<1:0>: mask source for filter 7 bits 11 = reserved 10 = acceptance mask 2 registers contain mask 01 = acceptance mask 1 registers contain mask 00 = acceptance mask 0 registers contain mask bit 13-12 f6msk<1:0>: mask source for filter 6 bits (same values as bit 15-14) bit 11-10 f5msk<1:0>: mask source for filter 5 bits (same values as bit 15-14) bit 9-8 f4msk<1:0>: mask source for filter 4 bits (same values as bit 15-14) bit 7-6 f3msk<1:0>: mask source for filter 3 bits (same values as bit 15-14) bit 5-4 f2msk<1:0>: mask source for filter 2 bits (same values as bit 15-14) bit 3-2 f1msk<1:0>: mask source for filter 1 bits (same values as bit 15-14) bit 1-0 f0msk<1:0>: mask source for filter 0 bits (same values as bit 15-14)
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 300 ? 2009-2012 microchip technology inc. register 21-19: cxfmsksel2: ecan x filter 15-8 mask selection register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f15msk<1:0> f14msk<1:0> f13msk<1:0> f12msk<1:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f11msk<1:0> f10msk<1:0> f9msk<1:0> f8msk<1:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-14 f15msk<1:0>: mask source for filter 15 bits 11 = reserved 10 = acceptance mask 2 registers contain mask 01 = acceptance mask 1 registers contain mask 00 = acceptance mask 0 registers contain mask bit 13-12 f14msk<1:0>: mask source for filter 14 bits (same values as bit 15-14) bit 11-10 f13msk<1:0>: mask source for filter 13 bits (same values as bit 15-14) bit 9-8 f12msk<1:0>: mask source for filter 12 bits (same values as bit 15-14) bit 7-6 f11msk<1:0>: mask source for filter 11 bits (same values as bit 15-14) bit 5-4 f10msk<1:0>: mask source for filter 10 bits (same values as bit 15-14) bit 3-2 f9msk<1:0>: mask source for filter 9 bits (same values as bit 15-14) bit 1-0 f8msk<1:0>: mask source for filter 8 bits (same values as bit 15-14)
? 2009-2012 microchip technology inc. ds70591e-page 301 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-20: cxrxmnsid: ecan x acceptance filter mask n standard identifier register (n = 0-2) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 bit 15 bit 8 r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 ?mide ?eid17eid16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-5 sid<10:0>: standard identifier bits 1 = includes bit, sidx, in filter comparison 0 = sidx bit is don?t care in filter comparison bit 4 unimplemented: read as ? 0 ? bit 3 mide: identifier receive mode bit 1 = matches only message types (standard or extended address) that correspond to exide bit in filter 0 = matches either standard or extended address message if filters match (i.e., if (filter sid) = (message sid) or if (filter sid/eid) = (message sid/eid)) bit 2 unimplemented: read as ? 0 ? bit 1-0 eid<17:16>: extended identifier bits 1 = includes bit, eidx, in filter comparison 0 = eidx bit is don?t care in filter comparison register 21-21: cxrxmneid: ecan x acceptance filter mask n extended identifier register (n = 0-2) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 eid<15:0>: extended identifier bits 1 = includes bit, eidx, in filter comparison 0 = eidx bit is don?t care in filter comparison
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 302 ? 2009-2012 microchip technology inc. register 21-22: cxrxful1: ecanx receive buffer full register 1 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful15 rxful14 rxful13 rxful12 rxful11 rxful10 rxful9 rxful8 bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful7 rxful6 rxful5 rxful4 rxful3 rxful2 rxful1 rxful0 bit 7 bit 0 legend: c = writeable, but only ?0? can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 rxful<15:0>: receive buffer n full bits 1 = buffer is full (set by module) 0 = buffer is empty register 21-23: cxrxful2: ecanx receive buffer full register 2 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful31 rxful30 rxful29 rxful28 rxful27 rxful26 rxful25 rxful24 bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful23 rxful22 rxful21 rxful20 rxful19 rxful18 rxful17 rxful16 bit 7 bit 0 legend: c = writeable, but only ?0? can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 rxful<31:16>: receive buffer n full bits 1 = buffer is full (set by module) 0 = buffer is empty
? 2009-2012 microchip technology inc. ds70591e-page 303 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 21-24: cxrxovf1: ecanx re ceive buffer overflow register 1 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf15 rxovf14 rxovf13 rxovf12 rxovf11 rxovf10 rxovf9 rxovf8 bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf7 rxovf6 rxovf5 rxovf4 rxovf3 rxovf2 rxovf1 rxovf0 bit 7 bit 0 legend: c = writeable, but only ?0? can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 rxovf<15:0>: receive buffer n overflow bits 1 = module attempted to write to a full buffer (set by module) 0 = no overflow condition register 21-25: cxrxovf2: ecanx re ceive buffer overflow register 2 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf31 rxovf30 rxovf29 rxovf28 rxovf27 rxovf26 rxovf25 rxovf24 bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf23 rxovf22 rxovf21 rxovf20 rxovf19 rxovf18 rxovf17 rxovf16 bit 7 bit 0 legend: c = writeable, but only ?0? can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 rxovf<31:16>: receive buffer n overflow bits 1 = module attempted to write to a full buffer (set by module) 0 = no overflow condition
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 304 ? 2009-2012 microchip technology inc. register 21-26: cxtrmncon: ecanx tx/rx buffer mn control register (m = 0, 2, 4, 6; n = 1, 3, 5, 7) r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 txenn txabtn txlarbn txerrn txreqn rtrenn txnpri<1:0> bit 15 bit 8 r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 txenm txabtm ( 1 ) txlarbm ( 1 ) txerrm ( 1 ) txreqm rtrenm txmpri<1:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 see definition for bits 7-0, controls buffer n bit 7 txenm: tx/rx buffer selection bit 1 = buffer trbn is a transmit buffer 0 = buffer trbn is a receive buffer bit 6 txabtm: message aborted bit ( 1 ) 1 = message was aborted 0 = message completed transmission successfully bit 5 txlarbm: message lost arbitration bit ( 1 ) 1 = message lost arbitration while being sent 0 = message did not lose arbitration while being sent bit 4 txerrm: error detected during transmission bit ( 1 ) 1 = a bus error occurred while the message was being sent 0 = a bus error did not occur while the message was being sent bit 3 txreqm: message send request bit 1 = requests that a message be sent; the bit automatic ally clears when the message is successfully sent 0 = clears the bit to ? 0 ?; while set, requests a message abort bit 2 rtrenm: auto-remote transmit enable bit 1 = when a remote transmit is received, txreqm will be set 0 = when a remote transmit is received, txreqm will be unaffected bit 1-0 txmpri<1:0>: message transmission priority bits 11 = highest message priority 10 = high intermediate message priority 01 = low intermediate message priority 00 = lowest message priority note 1: this bit is cleared when txreqm is set. note: the buffers, sid, eid, dlc, data field, and re ceive status registers are located in dma ram.
? 2009-2012 microchip technology inc. ds70591e-page 305 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 21.4 ecanx message buffers ecanx message buffers are part of dma ram memory. they are not ecan special function registers. the user application must directly write into the dma ram area that is configured for ecanx message buffers. the location and size of the buffer area is defined by the user application. buffer 21-1: ecan x message buffer word 0 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x ? ? ? sid10 sid9 sid8 sid7 sid6 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid5 sid4 sid3 sid2 sid1 sid0 srr ide bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 12-2 sid<10:0>: standard identifier bits bit 1 srr: substitute remote request bit 1 = message will request remote transmission 0 = normal message bit 0 ide: extended identifier bit 1 = message will transmit extended identifier 0 = message will transmit standard identifier buffer 21-2: ecan x message buffer word 1 u-0 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x ? ? ? ?eid17eid16eid15eid14 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid13 eid12 eid11 eid10 eid9 eid8 eid7 eid6 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as ? 0 ? bit 11-0 eid<17:6>: extended identifier bits
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 306 ? 2009-2012 microchip technology inc. ( buffer 21-3: ecan x message buffer word 2 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid5 eid4 eid3 eid2 eid1 eid0 rtr rb1 bit 15 bit 8 u-x u-x u-x r/w-x r/w-x r/w-x r/w-x r/w-x ? ? ? rb0 dlc3 dlc2 dlc1 dlc0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-10 eid<5:0>: extended identifier bits bit 9 rtr: remote transmission request bit 1 = message will request remote transmission 0 = normal message bit 8 rb1: reserved bit 1 user must set this bit to ? 0 ? per can protocol. bit 7-5 unimplemented: read as ? 0 ? bit 4 rb0: reserved bit 0 user must set this bit to ? 0 ? per can protocol. bit 3-0 dlc<3:0>: data length code bits buffer 21-4: ecanx message buffer word 3 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 1 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 byte 1<15:8>: ecanx message byte 0 bit 7-0 byte 0<7:0>: ecanx message byte 1
? 2009-2012 microchip technology inc. ds70591e-page 307 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 buffer 21-5: ecanx message buffer word 4 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 3 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 2 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 byte 3<15:8>: ecanx message byte 3 bit 7-0 byte 2<7:0>: ecanx message byte 2 buffer 21-6: ecanx message buffer word 5 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 5 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 4 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 byte 5<15:8>: ecanx message byte 5 bit 7-0 byte 4<7:0>: ecanx message byte 4
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 308 ? 2009-2012 microchip technology inc. buffer 21-7: ecanx message buffer word 6 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 7 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 6 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 byte 7<15:8>: ecanx message byte 7 bit 7-0 byte 6<7:0>: ecanx message byte 6 buffer 21-8: ecan x message buffer word 7 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x ? ? ? filhit<4:0> ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 12-8 filhit<4:0>: filter hit code bits ( 1 ) encodes number of filter that resulted in writing this buffer. bit 7-0 unimplemented: read as ? 0 ? note 1: only written by module for receive buffers, unused for transmit buffers.
? 2009-2012 microchip technology inc. ds70591e-page 309 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 22.0 high-speed, 10-bit analog-to-digital converter (adc) the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608 /610 devices provide high-speed successive approximation analog-to-digital conversions to support applic ations such as ac/dc and dc/dc power converters. 22.1 features overview the adc module incorporates the following features: ? 10-bit resolution ? unipolar inputs ? up to two successive approximation registers (sars) ? up to 24 external input channels ? two internal analog inputs ? dedicated result register for each analog input ? 1 lsb accuracy at 3.3v ? single supply operation ? 4 msps conversion rate at 3.3v (devices with two sars) ? 2 msps conversion rate at 3.3v (devices with one sar) ? low-power cmos technology 22.2 module description this adc module is designed for applications that require low latency between the request for conversion and the resultant output data. typical applications include: ? ac/dc power supplies ? dc/dc converters ? power factor correction (pfc) this adc works with the high-speed pwm module in power control applications that require high-frequency control loops. this module can sample-and-convert two analog inputs in a 0.5 microsecond when two sars are used. this small conversion delay reduces the ?phase lag? between measurement and control system response. up to five inputs may be sampled at a time (four inputs from the dedicated sample and hold circuits and one from the shared sample and hold circuit). if multiple inputs request conversion, the adc will convert them in a sequential manner, starting with the lowest order input. this adc design provides each pair of analog inputs (an1, an0), (an3, an2),..., the ability to specify its own trigger source out of a maximum of sixteen different trigger sources. this capability allows this adc to sam- ple-and-convert analog input s that are associated with pwm generators operating on independent time bases. the user application typically requires synchronization between analog data sampling and pwm output to the application circuit. the very high-speed operation of this adc module allows ?data on demand?. in addition, several hardware features have been added to the peripheral interface to improve real-time performance in a typical dsp-based application. ? result alignment options ? automated sampling ? external conversion start control ? two internal inputs to monitor the intref and extref input signals block diagrams of the adc module for the family devices are shown in figure 22-1 through figure 22-4 . note 1: this data sheet summ arizes the features of the dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/606/608/610 families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 44. ?high-speed 10-bit analog-to-digital converter (adc)? (ds70321) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 310 ? 2009-2012 microchip technology inc. 22.3 module functionality the high-speed, 10-bit adc is designed to support power conversion applications when used with the high-speed pwm module. the adc may have one or two sar modules, depending on the device variant. if two sars are present on a device, two conversions can be processed at a time, yielding 4 msps conversion rate. if only one sar is present on a device, only one conversion can be processed at a time, yielding 2 msps conversion rate. the high- speed, 10-bit adc produces two 10-bit conversion results in a 0.5 microsecond. the adc module supports up to 24 external analog inputs and two internal analog inputs. to monitor reference voltage, two internal inputs, an24 and an25, are connected to extref and intref, respectively. the analog reference voltage is defined as the device supply voltage (av dd /av ss ). the adc module uses the fo llowing control and status registers: ? adcon: adc control register ? adstat: adc status register ? adbase: adc base register (1,2) ? adpcfg: adc port configuration register ? adpcfg2: adc port configuration register 2 ? adcpc0: adc convert pair control register 0 ? adcpc1: adc convert pair control register 1 ? adcpc2: adc convert pair control register 2 ? adcpc3: adc convert pair control register 3 ? adcpc4: adc convert pair control register 4 ? adcpc5: adc convert pair control register 5 ? adcpc6: adc convert pair control register 6(2) the adcon register contro ls the operation of the adc module. the adstat register displays the status of the conversion processes. the adpcfg registers configure the port pins as analog inputs or as digital i/o. the adcpcx registers control the triggering of the adc conversions. see register 22-1 through register 22-12 for detailed bit configurations. note: a unique feature of the adc module is its ability to sample inputs in an asynchro- nous manner. individual sample and hold circuits can be triggered independently of each other.
? 2009-2012 microchip technology inc. ds70591e-page 311 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 22-1: adc block diagram for dspic33fj32gs406 an d dspic33fj64gs406 devices with one sar even numbered inputs with dedicated shared sample and hold data format sar core eight registers 16-bit sample and hold (s&h) circuits bus interface an0 an1 an7 an15 an3 an2 an4 an6 an5 an8 an9 an10 an11 an12 an13 an14
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 312 ? 2009-2012 microchip technology inc. figure 22-2: adc block diagram fo r dspic33fj32gs606 and DSPIC33FJ64GS606 devices with two sars even numbered inputs with dedicated even numbered inputs data format sar core seven registers 16-bit sample and hold (s&h) circuits bus interface an0 an8 an24 (1) an5 an10 an2 an4 an6 an12 an1 an3 (extref) an14 an9 an11 an13 an15 an25 (2) (intref) data format sar core seven registers 16-bit with shared s&h odd numbered inputs with shared s&h note 1: an24 (extref) is an internal analog input. to measure the vo ltage at an24 (extref), an analog comparator must be enabled and extref must be selected as the comparator reference. 2: an25 (intref) is an internal analog input and is not available on a pin.
? 2009-2012 microchip technology inc. ds70591e-page 313 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 22-3: adc block diagram for dspic33fj32gs608 an d dspic33fj64gs608 devices with two sars an25 (2) even numbered inputs with dedicated odd numbered inputs with shared s&h even numbered inputs with shared s&h data format sar core seven registers 16-bit sar core sample and hold (s&h) circuits bus interface an0 an2 an6 an1 an3 an8 an10 data format seven registers 16-bit an4 an5 an7 an9 an11 (intref) an17 an24 (1) (extref) an13 an15 an12 an14 an16 note 1: an24 (extref) is an internal analog input. to measure the voltage at an24 (extref), an analog comparator must be enabled and extref must be selected as the comparator reference. 2: an25 (intref) is an internal analog input and is not available on a pin.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 314 ? 2009-2012 microchip technology inc. figure 22-4: adc block diagram fo r dspic33fj32gs610 and dspic33fj64gs610 devices with two sars an25 (2) even numbered inputs with dedicated odd numbered inputs with shared s&h even numbered inputs with shared s&h data format sar core seven registers 16-bit sar core sample and hold (s&h) circuits bus interface an0 an2 an6 an1 an3 an8 an10 data format seven registers 16-bit an4 an5 an7 an9 an11 (intref) an24 (1) (extref) an13 an15 an12 an14 an16 an17 an19 an21 an23 an18 an20 an22 note 1: an24 (extref) is an internal analog input. to measure the voltage at an24 (extref), an analog comparator must be enabled and extref must be selected as the comparator reference. 2: an25 (intref) is an internal analog input and is not available on a pin.
? 2009-2012 microchip technology inc. ds70591e-page 315 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 22-1: adcon: adc control register r/w-0 u-0 r/w-0 r/w-0 u-0 r/w-0 u-0 r/w-0 adon ?adsidlslowclk ( 1 ) ?gswtrg ?form ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-1 r/w-1 eie ( 1 ) order ( 1 , 2 ) seqsamp ( 1 , 2 ) asyncsamp ( 1 ) ? adcs<2:0> ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 adon: adc module operating mode bit 1 = adc module is operating 0 = adc module is off bit 14 unimplemented: read as ? 0 ? bit 13 adsidl: adc stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 slowclk: enable the slow clock divider bit ( 1 ) 1 = adc is clocked by the auxiliary pll (aclk) 0 = adc is clock by the primary pll (f vco ) bit 11 unimplemented: read as ? 0 ? bit 10 gswtrg: global software trigger bit when this bit is set by the user, it will trigger conv ersions if selected by the trgsrcx<4:0> bits in the adcpcx registers. this bit must be cleared by the us er prior to initiating another global trigger (i.e., this bit is not auto-clearing). bit 9 unimplemented: read as ? 0 ? bit 8 form: data output format bit ( 1 ) 1 = fractional (d out = dddd dddd dd00 0000 ) 0 = integer (d out = 0000 00dd dddd dddd ) bit 7 eie: early interrupt enable bit ( 1 ) 1 = interrupt is generated after first conversion is completed 0 = interrupt is generated after second conversion is completed bit 6 order: conversion order bit ( 1 , 2 ) 1 = odd numbered analog input is converted firs t, followed by conversion of even numbered input 0 = even numbered analog input is converted first, followed by conversion of odd numbered input bit 5 seqsamp: sequential s&h sampling enable bit ( 1 , 2 ) 1 = shared sample and hold (s&h) circuit is sampled at the start of the second conversion if order = 0 . if order = 1 , then the shared s&h is sampled at the start of the first conversion. 0 = shared s&h is sampled at the same time the dedi cated s&h is sampled if the shared s&h is not cur- rently busy with an existing conversi on process. if the shared s&h is busy at the time the dedicated s&h is sampled, then the shared s&h will sample at the start of the new conversion cycle. bit 4 asyncsamp: asynchronous dedicated s&h sampling enable bit ( 1 ) 1 = the dedicated s&h is constantly sampling and t hen terminates sampling as soon as the trigger pulse is detected 0 = the dedicated s&h starts sampling when the trigger event is detected and completes the sampling process in two adc clock cycles note 1: this control bit can only be changed while the adc is disabled (adon = 0 ). 2: this control bit is only acti ve on devices that have one sar.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 316 ? 2009-2012 microchip technology inc. bit 3 unimplemented: read as ? 0 ? bit 2-0 adcs<2:0>: analog-to-digital conversion clock divider select bits ( 1 ) 111 = fadc/8 110 = fadc/7 101 = fadc/6 100 = fadc/5 011 = fadc/4 (default) 010 = fadc/3 001 = fadc/2 000 = fadc/1 register 22-1: adcon: adc control register (continued) note 1: this control bit can only be changed while the adc is disabled (adon = 0 ). 2: this control bit is only acti ve on devices that have one sar.
? 2009-2012 microchip technology inc. ds70591e-page 317 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 22-2: adstat: adc status register u-0 u-0 u-0 r/c-0, hs r/c-0, hs r/ c-0, hs r/c-0, hs r/c-0, hs ? ? ? p12rdy ( 1 ) p11rdy ( 1 ) p10rdy ( 1 ) p9rdy ( 1 ) p8rdy ( 1 ) bit 15 bit 8 r/c-0, hs r/c-0, hs r/c-0, hs r/c-0, hs r/c-0, hs r/c- 0, hs r/c-0, hs r/c-0, hs p7rdy ( 1 ) p6rdy ( 1 ) p5rdy ( 1 ) p4rdy ( 1 ) p3rdy ( 1 ) p2rdy ( 1 ) p1rdy ( 1 ) p0rdy ( 1 ) bit 7 bit 0 legend: c = clearable bit hs - hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 6 p12rdy: conversion data for pair 12 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 5 p11rdy: conversion data for pair 11 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 4 p10rdy: conversion data for pair 10 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 3 p9rdy: conversion data for pair 9 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 2 p8rdy: conversion data for pair 8 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 1 p7rdy: conversion data for pair 7 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 6 p6rdy: conversion data for pair 6 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 5 p5rdy: conversion data for pair 5 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 4 p4rdy: conversion data for pair 4 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 3 p3rdy: conversion data for pair 3 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 2 p2rdy: conversion data for pair 2 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 1 p1rdy: conversion data for pair 1 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. bit 0 p0rdy: conversion data for pair 0 ready bit ( 1 ) bit is set when data is ready in buffer, cleared when a ? 0 ? is written to this bit. note 1: not all pxrdy bits are available on all devices. see figure 22-1 , figure 22-2 , figure 22-3 and figure 22-4 for the available analog inputs.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 318 ? 2009-2012 microchip technology inc. register 22-3: adbase: adc base register ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adbase<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 adbase<7:1> ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-1 adbase<15:1>: adc base address bits this register contains the base address of the user ?s adc interrupt service routine jump table. this register, when read, contains the sum of the adb ase register contents and the encoded value of the pxrdy status bits. the encoder logic provides the bi t number of the highest priority pxrdy bits where p0rdy is the highest priority and p6rdy is the lowest priority. bit 0 unimplemented: read as ? 0 ? note 1: the encoding results are shifted left two bits so bits 1-0 of the result are always zero. 2: as an alternative to using the adbase register, t he adcp0-adcp12 adc pair conversion complete interrupts can be used to invoke analog-to-digital conversion completion routines for individual adc input pairs.
? 2009-2012 microchip technology inc. ds70591e-page 319 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 22-4: adpcfg: adc port configuration register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pcfg<15:8> ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pcfg<7:0> ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 pcfg<15:0>: adc port configuration control bits ( 1 ) 1 = port pin in digital mode, port read input is enabled; analog-to-digital input multiplexer is connected to av ss 0 = port pin in analog mode, port read input is disabled; analog-to-digital samples the pin voltage note 1: not all pcfgx bits are available on all devices. see figure 22-1 , figure 22-2 , figure 22-3 and figure 22-4 for the available analog inputs (pcfgx = anx, where x = 0-15). register 22-5: adpcfg2: adc po rt configuration register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pcfg<23:16> ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as ? 0 ? bit 7-0 pcfg<23:16>: adc port configuration control bits ( 1 ) 1 = port pin in digital mode, port read input is enabled; analog-to-digital input multiplexer is connected to av ss 0 = port pin in analog mode, port read input is disabled; analog-to-digital samples the pin voltage note 1: not all pcfgx bits are available on all devices. see figure 22-1 , figure 22-2 , figure 22-3 and figure 22-4 for the available analog inputs (pcfgx = anx, where x can be 0 through 15).
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 320 ? 2009-2012 microchip technology inc. register 22-6: adcpc0: adc con vert pair control register 0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen1 pend1 swtrg1 trgsrc1<4:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen0 pend0 swtrg0 trgsrc0<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 irqen1: interrupt request enable 1 bit 1 = enables irq generation when requested conversion of channels an3 and an2 is completed 0 = irq is not generated bit 14 pend1: pending conversion status 1 bit 1 = conversion of channels an3 and an2 is pending; set when selected trigger is asserted 0 = conversion is complete bit 13 swtrg1: software trigger 1 bit 1 = starts conversion of an3 and an2 (if selected in the trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend1 bit is set. 0 = conversion has not started note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 321 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 12-8 trgsrc1<4:0>: trigger 1 source selection bits selects trigger source for conversion of analog channels an3 and an2. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger is selected 10101 = pwm generator 8 secondary trigger is selected 10100 = pwm generator 7 secondary trigger is selected 10011 = pwm generator 6 secondary trigger is selected 10010 = pwm generator 5 secondary trigger is selected 10001 = pwm generator 4 secondary trigger is selected 10000 = pwm generator 3 secondary trigger is selected 01111 = pwm generator 2 secondary trigger is selected 01110 = pwm generator 1 secondary trigger is selected 01101 = pwm secondary special event trigger is selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger is selected 01010 = pwm generator 7 primary trigger is selected 01001 = pwm generator 6 primary trigger is selected 01000 = pwm generator 5 primary trigger is selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger is selected 00101 = pwm generator 2 primary trigger is selected 00100 = pwm generator 1 primary trigger is selected 00011 = pwm special event trigger selected 00010 = global software trigger is selected 00001 = individual software trigger is selected 00000 = no conversion is enabled bit 7 irqen0: interrupt request enable 0 bit 1 = enables irq generation when requested conver sion of channels an1 and an0 is completed 0 = irq is not generated bit 6 pend0: pending conversion status 0 bit 1 = conversion of channels an1 and an0 is pending; set when selected trigger is asserted 0 = conversion is complete bit 5 swtrg0: software trigger 0 bit 1 = starts conversion of an1 and an0 (if selected by trgsrcx<4:0> bits) ( 1 ) this bit is automatically cleared by hardware when the pend0 bit is set. 0 = conversion has not started. register 22-6: adcpc0: adc convert pa ir control register 0 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 322 ? 2009-2012 microchip technology inc. bit 4-0 trgsrc0<4:0>: trigger 0 source selection bits selects trigger source for conversion of analog channels an1 and an0. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger is selected 10101 = pwm generator 8 secondary trigger is selected 10100 = pwm generator 7 secondary trigger is selected 10011 = pwm generator 6 secondary trigger is selected 10010 = pwm generator 5 secondary trigger is selected 10001 = pwm generator 4 secondary trigger is selected 10000 = pwm generator 3 secondary trigger is selected 01111 = pwm generator 2 secondary trigger is selected 01110 = pwm generator 1 secondary trigger is selected 01101 = pwm secondary special event trigger is selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger is selected 01010 = pwm generator 7 primary trigger is selected 01001 = pwm generator 6 primary trigger is selected 01000 = pwm generator 5 primary trigger is selected 00111 = pwm generator 4 primary trigger is selected 00110 = pwm generator 3 primary trigger is selected 00101 = pwm generator 2 primary trigger is selected 00100 = pwm generator 1 primary trigger is selected 00011 = pwm special event trigger is selected 00010 = global software trigger is selected 00001 = individual software trigger is selected 00000 = no conversion is enabled register 22-6: adcpc0: a dc convert pair control register 0 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 323 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 22-7: adcpc1: adc con vert pair control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen3 pend3 swtrg3 trgsrc3<4:0> ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen2 pend2 swtrg2 trgsrc2<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 irqen3: interrupt request enable 3 bit 1 = enables irq generation when requested conver sion of channels an7 and an6 is completed 0 = irq is not generated bit 14 pend3: pending conversion status 3 bit 1 = conversion of channels an7 and an6 is pending; set when selected trigger is asserted 0 = conversion is complete bit 13 swtrg3: software trigger 3 bit 1 = starts conversion of an7 and an6 (if selected in trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend3 bit is set. 0 = conversion has not started note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 324 ? 2009-2012 microchip technology inc. bit 12-8 trgsrc3<4:0>: trigger 3 source selection bits ( 1 ) selects trigger source for conversion of analog channels an7 and an6. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger is selected 10101 = pwm generator 8 secondary trigger is selected 10100 = pwm generator 7 secondary trigger is selected 10011 = pwm generator 6 secondary trigger is selected 10010 = pwm generator 5 secondary trigger is selected 10001 = pwm generator 4 secondary trigger is selected 10000 = pwm generator 3 secondary trigger is selected 01111 = pwm generator 2 secondary trigger is selected 01110 = pwm generator 1 secondary trigger is selected 01101 = pwm secondary special event trigger is selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger is selected 01010 = pwm generator 7 primary trigger is selected 01001 = pwm generator 6 primary trigger is selected 01000 = pwm generator 5 primary trigger is selected 00111 = pwm generator 4 primary trigger is selected 00110 = pwm generator 3 primary trigger is selected 00101 = pwm generator 2 primary trigger is selected 00100 = pwm generator 1 primary trigger is selected 00011 = pwm special event trigger is selected 00010 = global software trigger is selected 00001 = individual software trigger is selected 00000 = no conversion is enabled bit 7 irqen2: interrupt request enable 2 bit 1 = enables irq generation when requested conversion of channels an5 and an4 is completed 0 = irq is not generated bit 6 pend2: pending conversion status 2 bit 1 = conversion of channels an5 and an4 is pending; set when selected trigger is asserted 0 = conversion is complete bit 5 swtrg2: software trigger 2 bit 1 = starts conversion of an5 and an4 (if selected by trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend2 bit is set. 0 = conversion has not started register 22-7: adcpc1: a dc convert pair control register 1 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 325 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 4-0 trgsrc2<4:0>: trigger 2 source selection bits selects trigger source for conversion of analog channels an5 and an4. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger is selected 10101 = pwm generator 8 secondary trigger is selected 10100 = pwm generator 7 secondary trigger is selected 10011 = pwm generator 6 secondary trigger is selected 10010 = pwm generator 5 secondary trigger is selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger is selected 01111 = pwm generator 2 secondary trigger is selected 01110 = pwm generator 1 secondary trigger is selected 01101 = pwm secondary special event trigger is selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger is selected 01010 = pwm generator 7 primary trigger is selected 01001 = pwm generator 6 primary trigger is selected 01000 = pwm generator 5 primary trigger is selected 00111 = pwm generator 4 primary trigger is selected 00110 = pwm generator 3 primary trigger is selected 00101 = pwm generator 2 primary trigger is selected 00100 = pwm generator 1 primary trigger is selected 00011 = pwm special event trigger is selected 00010 = global software trigger is selected 00001 = individual software trigger is selected 00000 = no conversion is enabled register 22-7: adcpc1: adc convert pa ir control register 1 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 326 ? 2009-2012 microchip technology inc. register 22-8: adcpc2: adc con vert pair control register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen5 pend5 swtrg5 trgsrc5<4:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen4 pend4 swtrg4 trgsrc4<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 irqen5: interrupt request enable 5 bit 1 = enables irq generation when requested conversion of channels an11 and an10 is completed 0 = irq is not generated bit 14 pend5: pending conversion status 5 bit 1 = conversion of channels an11 and an10 is pending; set when selected trigger is asserted 0 = conversion is complete bit 13 swtrg5: software trigger 5 bit 1 = starts conversion of an11 and an10 (if selected in trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend5 bit is set. 0 = conversion has not started note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 327 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 12-8 trgsrc5<4:0>: trigger 5 source selection bits selects trigger source for conversion of analog channels an11 and an10. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled bit 7 irqen4: interrupt request enable 4 bit 1 = enables irq generation when requested conver sion of channels an9 and an8 is completed 0 = irq is not generated bit 6 pend4: pending conversion status 4 bit 1 = conversion of channels an9 and an8 is pending; set when selected trigger is asserted 0 = conversion is complete bit 5 swtrg4: software trigger4 bit 1 = starts conversion of an9 and an8 (if selected by trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend4 bit is set. 0 = conversion has not started register 22-8: adcpc2: adc convert pa ir control register 2 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 328 ? 2009-2012 microchip technology inc. bit 4-0 trgsrc4<4:0>: trigger 4 source selection bits selects trigger source for conversion of analog channels an9 and an8. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled register 22-8: adcpc2: a dc convert pair control register 2 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 329 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 22-9: adcpc3: adc con vert pair control register 3 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen7 pend7 swtrg7 trgsrc7<4:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen6 pend6 swtrg6 trgsrc6<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 irqen7: interrupt request enable 7 bit 1 = enables irq generation when requested conversion of channels an15 and an14 is completed 0 = irq is not generated bit 14 pend7: pending conversion status 7 bit 1 = conversion of channels an15 and an14 is pending; set when selected trigger is asserted 0 = conversion is complete bit 13 swtrg7: software trigger 7 bit 1 = starts conversion of an15 and an14 (if selected in trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend7 bit is set. 0 = conversion has not started note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 330 ? 2009-2012 microchip technology inc. bit 12-8 trgsrc7<4:0>: trigger 7 source selection bits selects trigger source for conversion of analog channels an15 and 14. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled bit 7 irqen6: interrupt request enable 6 bit 1 = enables irq generation when requested conversion of channels an13 and an12 is completed 0 = irq is not generated bit 6 pend6: pending conversion status 6 bit 1 = conversion of channels an13 and an12 is pending; set when selected trigger is asserted 0 = conversion is complete bit 5 swtrg6: software trigger 6 bit 1 = starts conversion of an13 and an12 (if selected by trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend6 bit is set. 0 = conversion has not started register 22-9: adcpc3: a dc convert pair control register 3 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 331 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 4-0 trgsrc6<4:0>: trigger 6 source selection bits selects trigger source for conversion of analog channels an13 and an12. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled register 22-9: adcpc3: adc convert pa ir control register 3 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 332 ? 2009-2012 microchip technology inc. register 22-10: adcpc4: adc con vert pair control register 4 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen9 pend9 swtrg9 trgsrc9<4:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen8 pend8 swtrg8 trgsrc8<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 irqen9: interrupt request enable 9 bit 1 = enable irq generation when requested conversion of channels an19 and an18 is completed 0 = irq is not generated bit 14 pend9: pending conversion status 9 bit 1 = conversion of channels an19 and an18 is pending; set when selected trigger is asserted 0 = conversion is complete bit 13 swtrg9: software trigger 9 bit 1 = start conversion of an19 and an18 (if selected in trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend9 bit is set. 0 = conversion is not started note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 333 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 12-8 trgsrc9<4:0>: trigger 9 source selection bits selects trigger source for conversion of analog channels an19 and an18. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled bit 7 irqen8: interrupt request enable 8 bit 1 = enables irq generation when requested conversion of channels an17 and an16 is completed 0 = irq is not generated bit 6 pend8: pending conversion status 8 bit 1 = conversion of channels an17 and an16 is pending; set when selected trigger is asserted 0 = conversion is complete bit 5 swtrg8: software trigger 8 bit 1 = starts conversion of an17 and an16 (if selected by trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend8 bit is set. 0 = conversion has not started register 22-10: adcpc4: adc convert pa ir control register 4 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 334 ? 2009-2012 microchip technology inc. bit 4-0 trgsrc8<4:0>: trigger 8 source selection bits selects trigger source for conversion of analog channels an17 and an16. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled register 22-10: adcpc4: adc convert pa ir control register 4 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 335 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 22-11: adcpc5: adc con vert pair control register 5 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen11 pend11 swtrg11 trgsrc11<4:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen10 pend10 swtrg10 trgsrc10<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 irqen11: interrupt request enable 11 bit 1 = enables irq generation when requested conversion of channels an23 and an22 is completed 0 = irq is not generated bit 14 pend11: pending conversion status 11 bit 1 = conversion of channels an23 and an22 is pending; set when selected trigger is asserted 0 = conversion is complete bit 13 swtrg11: software trigger 11 bit 1 = starts conversion of an23 and an22 (if selected in trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend11 bit is set. 0 = conversion is not started note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 336 ? 2009-2012 microchip technology inc. bit 12-8 trgsrc11<4:0>: trigger 11 source selection bits selects trigger source for conversion of analog channels an23 and an22. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled bit 7 irqen10: interrupt request enable 10 bit 1 = enables irq generation when requested conversion of channels an21 and an20 is completed 0 = irq is not generated bit 6 pend10: pending conversion status 10 bit 1 = conversion of channels an21 and an20 is pending; set when selected trigger is asserted 0 = conversion is complete bit 5 swtrg10: software trigger 10 bit 1 = starts conversion of an21 and an20 (if selected by trgsrc bits) ( 1 ) this bit is automatically cleared by hardware when the pend10 bit is set. 0 = conversion has not started register 22-11: adcpc5: adc convert pa ir control register 5 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
? 2009-2012 microchip technology inc. ds70591e-page 337 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 4-0 trgsrc10<4:0>: trigger 10 source selection bits selects trigger source for conversion of analog channels an21 and an20. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion enabled register 22-11: adcpc5: adc convert pa ir control register 5 (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 338 ? 2009-2012 microchip technology inc. register 22-12: adcpc6: adc con vert pair control register 6 ( 2 ) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 ? ? ? ? ? ? ? ? bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqen12 pend12 swtrg12 trgsrc12<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as ? 0 ? bit 7 irqen12: interrupt request enable 12 bit 1 = enables irq generation when requested conversion of channels an25 and an24 is completed 0 = irq is not generated bit 6 pend12: pending conversion status 12 bit 1 = conversion of channels an25 and an24 is pending; set when selected trigger is asserted 0 = conversion is complete bit 5 swtrg12: software trigger 12 bit 1 = starts conversion of an25 (intref) and an24 (extref) if selected by trgsrc bits ( 1 ) this bit is automatically cleared by hardware when the pend12 bit is set. 0 = conversion has not started note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available. 2: this register is not available on dspic33fj32gs406 and dspic33fj64gs406 devices.
? 2009-2012 microchip technology inc. ds70591e-page 339 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 bit 4-0 trgsrc12<4:0>: trigger 12 source selection bits selects trigger source for conversion of analog channels an25 and an24. 11111 = timer2 period match 11110 = pwm generator 8 current-limit adc trigger 11101 = pwm generator 7 current-limit adc trigger 11100 = pwm generator 6 current-limit adc trigger 11011 = pwm generator 5 current-limit adc trigger 11010 = pwm generator 4 current-limit adc trigger 11001 = pwm generator 3 current-limit adc trigger 11000 = pwm generator 2 current-limit adc trigger 10111 = pwm generator 1 current-limit adc trigger 10110 = pwm generator 9 secondary trigger selected 10101 = pwm generator 8 secondary trigger selected 10100 = pwm generator 7 secondary trigger selected 10011 = pwm generator 6 secondary trigger selected 10010 = pwm generator 5 secondary trigger selected 10001 = pwm generator 4 secondary trigger selected 10000 = pwm generator 3 secondary trigger selected 01111 = pwm generator 2 secondary trigger selected 01110 = pwm generator 1 secondary trigger selected 01101 = pwm secondary special event trigger selected 01100 = timer1 period match 01011 = pwm generator 8 primary trigger selected 01010 = pwm generator 7 primary trigger selected 01001 = pwm generator 6 primary trigger selected 01000 = pwm generator 5 primary trigger selected 00111 = pwm generator 4 primary trigger selected 00110 = pwm generator 3 primary trigger selected 00101 = pwm generator 2 primary trigger selected 00100 = pwm generator 1 primary trigger selected 00011 = pwm special event trigger selected 00010 = global software trigger selected 00001 = individual software trigger selected 00000 = no conversion is enabled register 22-12: adcpc6: adc con vert pair control register 6 ( 2 ) (continued) note 1: the trigger source must be set as a global so ftware trigger prior to setting this bit to ? 1 ?. if other conversions are in progress, the conversion is perf ormed when the conversion resources are available. 2: this register is not available on dspic33fj32gs406 and dspic33fj64gs406 devices.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 340 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 341 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 23.0 high-speed analog comparator the dspic33f switch mode power supply (smps) comparator module monitors current and/or voltage transients that may be too fast for the cpu and adc to capture. 23.1 features overview the smps comparator module offers the following major features: ? 16 selectable comparator inputs ? up to four analog comparators ? 10-bit dac for each analog comparator ? programmable output polarity ? interrupt generation capability ? dacout pin to provide dac output ? dac has three ranges of operation: -av dd /2 - internal reference (intref) - external reference (extref) ? adc sample-and-convert trigger capability ? disable capability reduces power consumption ? functional support for pwm module: - pwm duty cycle control - pwm period control - pwm fault detect 23.2 module description figure 23-1 shows a functional block diagram of one analog comparator from the smps comparator module. the analog comparator provides high-speed operation with a typical dela y of 20 ns. the comparator has a typical offset voltage of 5 mv. the negative input of the comparator is always connected to the dac circuit. the positive input of the comparator is connected to an analog multiplexer that selects the desired source pin. the analog comparator input pins are typically shared with pins used by the analog-to-digital converter (adc) module. both the comparator and the adc can use the same pins at the same time. this capability enables a user to measure an input voltage with the adc and detect voltage transients with the comparator. figure 23-1: high-speed analog co mparator x module block diagram note 1: this data sheet summarizes the features of the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 fami- lies of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to section 45. ?high-speed analog comparator? (ds70296) in the ?dspic33f/pic24h family reference manual? , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. cmpxa* cmpxc* dac cmppol 0 1 av dd /2 intref (1) m u x cmref cmpx* insel<1:0> 10 trigger to pwm interrupt cmpxb* cmpxd* pulse extref (1) status av ss generator range dacout dacoe * x = 1, 2, 3 and 4 note 1: refer to parameters da01 and da08 in the dac module specifications ( table 27-43 ) for details. m u x glitch filter request
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 342 ? 2009-2012 microchip technology inc. 23.3 module applications this module provides a means for the smps dspic ? dsc devices to monitor voltage and currents in a power conversion application. the ability to detect transient conditions and stimulate the dspic dsc processor and/or periphera ls, without requiring the processor and adc to constantly monitor voltages or currents, frees the dspic dsc to perform other tasks. the comparator module has a high-speed comparator and an associated 10-bit dac that provides a pro- grammable reference voltage to the inverting input of the comparator. the polarity of the comparator output is user-programmable. the output of the module can be used in the following modes: ? generate an interrupt ? trigger an adc sample-and-convert process ? truncate the pwm signal (current limit) ? truncate the pwm period (current minimum) ? disable the pwm outputs (fault latch) the output of the comparat or module may be used in multiple modes at the same time, such as: 1) generate an interrupt, 2) have the adc take a sample and con- vert it, and 3) truncate t he pwm output in response to a voltage being detected beyond its expected value. the comparator module can also be used to wake-up the system from sleep or idle mode when the analog input voltage exceeds the programmed threshold voltage. 23.4 dac the range of the dac is controlled via an analog multiplexer that selects either av dd /2, an internal ref- erence source, intref, or an external reference source, extref. the full range of the dac (av dd /2) will typically be used when the chosen input source pin is shared with the adc. the reduced range option (intref) will likely be used when monitoring current levels using a current sense resistor. usually, the measured voltages in such applications are small (<1.25v); therefore the option of using a reduced reference range for the comparator extends the available dac resolution in these applications. the use of an external reference enables the user to connect to a reference that better suits their application. dacout, shown in figure 23-1 , can only be associated with a single comparator at a given time. 23.5 interaction with i/o buffers if the comparator module is enabled and a pin has been selected as the source for the comparator, then the chosen i/o pad must disable the digital input buffer associated with the pad to prevent excessive currents in the digital buffer due to analog input voltages. 23.6 digital logic the cmpconx register (see register 23-1 ) provides the control logic that co nfigures the comparator module. the digital logic provides a glitch filter for the comparator output to mask transient signals in less than two instruction cycles. in sleep or idle mode, the glitch filter is bypassed to enable an asynchronous path from the comparator to the interrupt controller. this asynchronous path can be used to wake-up the processor from sleep or idle mode. the comparator can be disabled while in idle mode if the cmpsidl bit is set. if a device has multiple comparators, if any cmpsidl bit is set, then the entire group of comparators will be disabled while in idle mode. this behavior reduces complexity in the design of the clock control l ogic for this module. the digital logic also provides a one t cy width pulse generator for triggering the adc and generating interrupt requests. the cmpdacx (see register 23-2 ) register provides the digital input value to the reference dac. if the module is disabled, the dac and comparator are disabled to reduce power consumption. 23.7 comparator input range the comparator has a limitation for the input common-mode range (cmr) of (av dd ? 1.5v), typical. this means that both inputs should not exceed this range. as long as one of the inputs is within the common-mode range, the comparator output will be correct. however, any input exceeding the cmr limitation will cause the comparator input to be saturated. if both inputs exceed the cmr, the comp arator output will be indeterminate. 23.8 dac output range the dac has a limitation for the maximum reference voltage input of (av dd ? 1.6) volts. an external reference voltage input should not exceed this value or the reference dac output will become indeterminate. 23.9 comparator registers the comparator module is controlled by the following registers: ? cmpconx: comparator control x register ? cmpdacx: comparator dac control x register note: it should be ensured in software that multiple dacoe bits are not set. the output on the dacout pin will be indeter- minate if multiple comparators enable the dac output.
? 2009-2012 microchip technology inc. ds70591e-page 343 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 register 23-1: cmpconx: comparator control x register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 r/w-0 cmpon ? cmpsidl r r r rdacoe bit 15 bit 8 r/w-0 r/w-0 r/w-0 u-0 r/w-0 u-0 r/w-0 r/w-0 insel<1:0> extref rcmpstat r cmppol range bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 cmpon: comparator operating mode bit 1 = comparator module is enabled 0 = comparator module is disabled (reduces power consumption) bit 14 unimplemented: read as ? 0 ? bit 13 cmpsidl: comparator stop in idle mode bit 1 = discontinues module operation when device enters idle mode. 0 = continues module operation in idle mode if a device has multiple comparators, any cmpsidl bit set to ? 1 ? disables all comparators while in idle mode. bit 12-9 reserved: read as ? 0 ? bit 8 dacoe: dac output enable 1 = dac analog voltage is output to dacout pin ( 1 ) 0 = dac analog voltage is not connected to dacout pin bit 7-6 insel<1:0>: input source select for comparator bits 11 = selects cmpxd input pin 10 = selects cmpxc input pin 01 = selects cmpxb input pin 00 = selects cmpxa input pin bit 5 extref: enable external reference bit 1 = external source provides reference to da c (maximum dac voltage determined by external voltage source) 0 = internal reference sources provide reference to dac (maximum dac voltage determined by range bit setting) bit 4 reserved: read as ? 0 ? bit 3 cmpstat: current state of comparator output including cmppol selection bit bit 2 reserved: read as ? 0 ? bit 1 cmppol: comparator output polarity control bit 1 = output is inverted 0 = output is non-inverted bit 0 range: selects dac output voltage range bit 1 = high range: max dac value = av dd /2, 1.65v at 3.3v av dd 0 = low range: max dac value = intref note 1: dacout can be associated only with a single comparat or at any given time. the software must ensure that multiple comparators do not enable the da c output by setting their respective dacoe bit.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 344 ? 2009-2012 microchip technology inc. register 23-2: cmpdacx: compa rator dac control x register u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 ? ? ? ? ? ?cmref<9:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cmref<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-10 reserved: read as ? 0 ? bit 9-0 cmref<9:0>: comparator reference voltage select bits 1111111111 = (cmref * intref/1024) or (cmref * (av dd /2)/1024) volts depending on the range bit or (cmref * extre f/1024) if extref is set ? ? ? 0000000000 = 0.0 volts
? 2009-2012 microchip technology inc. ds70591e-page 345 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 24.0 special features the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 devices include several features intended to maximize application flexibility and reliability, and minimize cost through elimination of external components. these are: ? flexible configuration ? watchdog timer (wdt) ? code protection and codeguard? security ? jtag boundary scan interface ? in-circuit serial programming? (icsp?) ? in-circuit emulation ? brown-out reset (bor) 24.1 configuration bits the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608 /610 devices provide non-volatile memory implementations for device configuration bits. refer to section 25. ?device configuration? (ds70194) in the ?dspic33f/pic24h family reference manual? for more information on this implementation. the configuration bits can be programmed (read as ? 0 ?), or left unprogrammed (read as ? 1 ?), to select various device configurations. these bits are mapped starting at program memory location 0xf80000. the individual configuration bit descriptions for the configuration registers are shown in table 24-2 . note that address, 0xf80000, is beyond the user pro- gram memory space. it belongs to the configuration memory space (0x800000-0xffffff), which can only be accessed using table reads and table writes. to prevent inadvertent configuration changes during code execution, all progr ammable configuration bits are write-once. after a bit is initially programmed during a power cycle, it cannot be written again. changing a device configuration requires that power to the device be cycled. the device configuration register map is shown in table 24-1 . note 1: this data sheet summarizes the features of the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices. it is not intended to be a compre- hensive reference source. to complement the information in this data sheet, refer to the ?dspic33f/pic24h fa mily reference manual? . please see the microchip web site ( www.microchip.com ) for the latest ?dspic33f/pic24h family reference manual? sections. 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 ?memory organization? in this data sheet for de vice-specific register and bit information. table 24-1: device configuration register map address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0xf80000 fbs ? ? ? ?bss<2:0>bwrp 0xf80002 reserved ? ? ? ? ? ? ? ? 0xf80004 fgs ? ? ? ? ?gss<1:0>gwrp 0xf80006 foscsel ieso ? ? ?fnosc<2:0> 0xf80008 fosc fcksm<1:0> ? ? ? osciofnc poscmd<1:0> 0xf8000a fwdt fwdten windis ? wdtpre wdtpost<3:0> 0xf8000c fpor ? altqio altss1 ? ?fpwrt<2:0> 0xf8000e ficd reserved ( 1 ) reserved ( 1 ) jtagen ? ? ?ics<1:0> 0xf80010 fcmp ? ? cmppol1 ( 2 ) hyst1<1:0> ( 2 ) cmppol0 ( 2 ) hyst0<1:0> ( 2 ) legend: ? = unimplemented bit, read as ? 0 ?. note 1: these bits are reserved for use by devel opment tools and must be programmed as ? 1 ?. 2: these bits are reserved on dspic33fjx xxgs406 devices and always read as ? 1 ?.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 346 ? 2009-2012 microchip technology inc. table 24-2: dspic33f configuration bits description bit field register rtsp effect description bwrp fbs immediate boot segment program fl ash write protection bit 1 = boot segment can be written 0 = boot segment is write-protected bss<2:0> fbs immediate boot segment program flash code protection size bits x11 = no boot program flash segment boot space is 256 instruction words (except interrupt vectors) 110 = standard security; boot program flash segment ends at 0x0003fe 010 = high security; boot program flash segment ends at 0x0003fe boot space is 768 instruction words (except interrupt vectors) 101 = standard security; boot program flash segment ends at 0x0007fe 001 = high security; boot program flash segment ends at 0x0007fe boot space is 1792 instruction words (except interrupt vectors) 100 = standard security; boot program flash segment ends at 0x000ffe 000 = high security; boot program flash segment ends at 0x000ffe gss<1:0> fgs immediate general segment code-protect bits 11 = user program memory is not code-protected 10 = standard security 0x = high security gwrp fgs immediate general segment write-protect bit 1 = user program memory is not write-protected 0 = user program memory is write-protected ieso foscsel immediate two-speed oscillator start-up enable bit 1 = start-up device with frc, then automatically switch to the user selected oscillator source when ready 0 = start-up device with user selected oscillator source fnosc<2:0> foscsel if clock switch is enabled, rtsp effect is on any device reset; otherwise, immediate initial oscillator source selection bits 111 = internal fast rc (frc) oscillator with postscaler 110 = internal fast rc (frc) oscillator with divide-by-16 101 = lprc oscillator 100 = secondary (lp) oscillator 011 = primary (xt, hs, ec) oscillator with pll 010 = primary (xt, hs, ec) oscillator 001 = internal fast rc (f rc) oscillator with pll 000 = frc oscillator fcksm<1:0> fosc immediate clock switching mode bits 1x = clock switching is disabled, fail-safe clock monitor is disabled 01 = clock switching is enabled, fail-safe clock monitor is disabled 00 = clock switching is enabled, fail-safe clock monitor is enabled osciofnc fosc immediate osc2 pin function bit (except in xt and hs modes) 1 = osc2 is the clock output 0 = osc2 is the general purpose digital i/o pin poscmd<1:0> fosc immediate primary oscillator mode select bits 11 = primary oscillator is disabled 10 = hs crystal oscillator mode 01 = xt crystal oscillator mode 00 = ec (external clock) mode
? 2009-2012 microchip technology inc. ds70591e-page 347 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 fwdten fwdt immediate watchdog timer enable bit 1 = watchdog timer is always enabled (lprc oscillator cannot be disabled; clearing the swdten bit in the rcon register will have no effect) 0 = watchdog timer is enabled/disabled by user software (lprc can be disabled by clearing the swdten bit in the rcon register) windis fwdt immediate watchdog timer window enable bit 1 = watchdog timer in non-window mode 0 = watchdog timer in window mode wdtpre fwdt immediate watchdog timer prescaler bit 1 = 1:128 0 = 1:32 wdtpost<3:0> fwdt immediate watchdog timer postscaler bits 1111 = 1:32,768 1110 = 1:16,384 ? ? ? 0001 = 1:2 0000 = 1:1 fpwrt<2:0> fpor immediate power-on reset timer value select bits 111 = pwrt = 128 ms 110 = pwrt = 64 ms 101 = pwrt = 32 ms 100 = pwrt = 16 ms 011 = pwrt = 8 ms 010 = pwrt = 4 ms 001 = pwrt = 2 ms 000 = pwrt = disabled jtagen ficd immediate jtag enable bit 1 = jtag is enabled 0 = jtag is disabled ics<1:0> ficd immediate icd communication channel select enable bits 11 = communicate on pgec1 and pged1 10 = communicate on pgec2 and pged2 01 = communicate on pgec3 and pged3 00 = reserved, do not use altqio fpor immediate enable alternate qei1 pin bit 1 = qea1, qeb1 and indx1 are selected as inputs to qei1 0 = aqea1, aqeb1 and aindx1 are selected as inputs to qei1 altss1 fpor immediate enable alternate ss1 pin bit 1 = ass1 is selected as the i/o pin for spi1 0 = ss1 is selected as the i/o pin for spi1 cmppol0 fcmp immediate comparator hysteresis pola rity bit (for even numbered comparators) 1 = hysteresis is applied to falling edge 0 = hysteresis is applied to rising edge hyst0<1:0> fcmp immediate comparator hysteresis select bits 11 = 45 mv hysteresis 10 = 30 mv hysteresis 01 = 15 mv hysteresis 00 = no hysteresis table 24-2: dspic33f configuratio n bits description (continued) bit field register rt sp effect description
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 348 ? 2009-2012 microchip technology inc. cmppol1 fcmp immediate comparator hysteresis polarity bit (for odd numbered comparators) 1 = hysteresis is applied to falling edge 0 = hysteresis is applied to rising edge hyst1<1:0> fcmp immediate compara tor hysteresis select bits 11 = 45 mv hysteresis 10 = 30 mv hysteresis 01 = 15 mv hysteresis 00 = no hysteresis table 24-2: dspic33f configuratio n bits description (continued) bit field register rtsp effect description
? 2009-2012 microchip technology inc. ds70591e-page 349 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 24.2 on-chip voltage regulator the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 devices power their core digital logic at a nominal 2.5v. this can create a conflict for designs that are required to operate at a higher typical voltage, such as 3.3v. to simplify system design, all devices in t he dspic33fj32gs406/606/608/ 610 and dspic33fj64gs406/606/608/610 families incorporate an on-chip regulator that allows the device to run its core logic from v dd . the regulator provides power to the core from the other v dd pins. when the regulator is enabled, a low-esr (less than 5 ohms) capacitor (such as tantalum or ceramic) must be connected to the v cap pin ( figure 24-1 ). this helps to maintain the stability of the regulator. the recommended value for the filter capacitor is provided in table 27-13 , located in section 27.1 ?dc characteristics? . on a por , it takes approximately 20 ? s for the on-chip voltage regulator to generate an output voltage. during this time, designated as t startup , code execution is disabled. t startup is applied every time the device resumes operation after any power-down. figure 24-1: connections for the on-chip voltage regulator ( 1 , 2 , 3 ) 24.3 brown-out reset (bor) the brown-out reset (bor) module is based on an internal voltage reference circuit. the main purpose of the bor module is to generate a device reset when a brown-out condition occurs. brown-out conditions are generally caused by glitches on the ac mains (for example, missing portions of the ac cycle waveform due to bad power transmission lines, or voltage sags due to excessive current draw when a large inductive load is turned on). a bor generates a reset pulse, which resets the device. the bor selects the clock source based on the device configuration bit values (fnosc<2:0> and poscmd<1:0>). if an oscillator mode is selected, the bor activates the oscillator start-up timer (o st). the system clock is held until ost expires. if the pll is used, the clock is held until the lock bit (osccon<5>) is ? 1 ?. concurrently, the power-up timer (pwrt) time-out (t pwrt ) is applied before the internal reset is released. if t pwrt = 0 and a crystal oscillator is being used, then a nominal delay of t fscm = 100 is applied. the total delay in this case is t fscm . the bor status bit (rcon<1>) is set to indicate that a bor has occurred. the bor circuit continues to operate while in sleep or idle modes and resets the device should v dd fall below the bor threshold voltage. 24.4 watchdog timer (wdt) for dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608 /610 devices, the wdt is driven by the lprc oscillator. when the wdt is enabled, the clock source is also enabled. 24.4.1 prescaler/postscaler the nominal wdt clock source from lprc is 32.767 khz. this feeds a prescaler that can be config- ured for either 5-bit (divide-by -32) or 7-bit (divide-by-128) operation. the prescaler is set by the wdtpre config- uration bit. with a 32.767 kh z input, the prescaler yields a nominal wdt time-out (t wdt ) period of 1 ms in 5-bit mode or 4 ms in 7-bit mode. a variable postscaler divides down the wdt prescaler output and allows for a wide range of time-out periods. the postscaler is controlled by the wdtpost<3:0> configuration bits (fwdt<3:0>), which allow the selection of 16 settings, from 1:1 to 1:32,768. using the prescaler and postscaler, time-out periods, ranging from 1 ms to 131 seconds, can be achieved. note: it is important for the low-esr capacitor to be placed as close as possible to the v cap pin. note 1: these are typical operating voltages. refer to table 27-13 located in section 27.1 ?dc characteristics? for the full operating ranges of v dd . 2: it is important for the low-esr capacitor to be placed as close as possible to the v cap pin. 3: typical v cap pin voltage = 2.5v when v dd ? v ddmin . v dd v cap v ss dspic33f c efc 3.3v
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 350 ? 2009-2012 microchip technology inc. the wdt, prescaler and postscaler are reset: ? on any device reset ? on the completion of a clock switch, whether invoked by software (i.e., setting the oswen bit after changing the nosc bits) or by hardware (i.e., fail-safe clock monitor) ? when a pwrsav instruction is executed (i.e., sleep or idle mode is entered) ? when the device exits sleep or idle mode to resume normal operation ?by a clrwdt instruction during normal execution 24.4.2 sleep and idle modes if the wdt is enabled, it will continue to run during sleep or idle modes. when the wdt time-out occurs, the wdt will wake the device and code execution will continue from where the pwrsav instruction was executed. the corresponding sleep or idle bits (rcon<3:2>) will need to be cleared in software after the device wakes up. 24.4.3 enabling wdt the wdt is enabled or disabled by the fwdten configuration bit in the fwdt configuration register. when the fwdten configuration bit is set, the wdt is always enabled. the wdt can be optionally controlled in software when the fwdten configuration bit has been programmed to ? 0 ?. the wdt is enabled in software by setting the swdten control bit ( rcon<5>). the swdten control bit is cleared on any device reset. the software wdt option allows the user application to enable the wdt for critical code segments and disable the wdt during non-critical segments for maximum power savings. the wdt flag bit, wdto (rcon< 4>), is not automatically cleared following a wdt time-out. to detect subsequent wdt events, the flag must be cleared in software. figure 24-2: wdt block diagram note: the clrwdt and pwrsav instructions clear the prescaler and postscaler counts when executed. note: if the windis bit (fwdt<6>) is cleared, the clrwdt instruction should be executed by the application software only during the last 1/4 of the wdt period. this clrwdt window can be determined by using a timer. if a clrwdt instruction is executed before this window, a wdt reset occurs. 0 1 wdtpre wdtpost<3:0> watchdog timer sleep/idle wdt wdt window select windis wdt clrwdt instruction swdten fwdten lprc clock wake-up reset all device resets transition to new clock source exit sleep or idle mode pwrsav instruction clrwdt instruction prescaler (divide-by-n1) rs postscaler (divide-by-n2) rs
? 2009-2012 microchip technology inc. ds70591e-page 351 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 24.5 jtag interface dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices implement a jtag interface, whic h supports boundary scan device testing, as well as in-circuit programming. detailed information on this interface will be provided in future revisions of the document. 24.6 in-circuit serial programming dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/ 608/610 family digital signal controllers (dscs) can be serially programmed while in the end application circuit. this is done with two lines for clock and data and three other lines for power, ground and the programming sequence. serial programming allows customers to manufacture boards with unprogrammed devices and then program the digital signal controller just before shipping the product. serial programming also allows the most recent firmware or a custom firmware to be programmed. refer to the ?dspic33f/pic24h flash programming specification? (ds70152) for details about in-circuit serial programming? (icsp?). any of the three pairs of programming clock/data pins can be used: ? pgec1 and pged1 ? pgec2 and pged2 ? pgec3 and pged3 24.7 in-circuit debugger when mplab icd 3 is selected as a debugger, the in- circuit debugging functionality is enabled. this function allows simple debugging functions when used with mplab ? ide. debugging functionality is controlled through the emucx (emulation/debug clock) and emudx (emulation/debug data) pin functions. any of the three pairs of debugging clock/data pins can be used: ? pgec1 and pged1 ? pgec2 and pged2 ? pgec3 and pged3 to use the in-circuit debug ger function of the device, the design must implement icsp connections to mclr , v dd , v ss , pgecx, pgedx and the emudx/ emucx pin pair. in addition, when the feature is enabled, some of the resources are not available for general use. these resources include the first 80 bytes of data ram and two i/o pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 352 ? 2009-2012 microchip technology inc. 24.8 code protection and codeguard? security the dspic33fj32gs 406/606/608/610 and dspic33fj64gs406/606/608/610 devices offer the intermediate implementation of codeguard? security. codeguard security enables multiple parties to securely share resources (memory, interrupts and peripherals) on a single chip. this feature helps protect individual intellectual property in collaborative system designs. when coupled with software encryption libraries, codeguard security can be used to securely update flash even when multiple ips reside on a single chip. the code protection featur es are controlled by the configuration registers: fbs and fgs. secure segment and ram protection is not imple- mented in dspic33fj 32gs406/606/608/610 and dspic33fj64gs406/6 06/608/610 devices. table 24-3: code flash security segm ent sizes for 64-kbyte devices table 24-4: code flash security segm ent sizes for 32-kbyte devices note: refer to section 23. ?codeguard? security? (ds70199) in the ?dspic33f/ pic24h family reference manual? for further information on usage, configuration and operation of codeguard security. bss<2:0> = x11 , 0k bss<2:0> = x10 , 1k bss<2:0> = x01 , 4k bss<2:0> = x00 , 8k bss<2:0> = x11 , 0k bss<2:0> = x10 , 1k bss<2:0> = x01 , 4k bss<2:0> = x00 , 8k 0001feh 000200h 000000h vs = 256 iw 00abfeh gs = 21760 iw 0001feh 000200h 000000h vs = 256 iw 0007feh 000800h 00abfeh gs = 20992 iw bs = 768 iw 0001feh 000200h 000000h vs = 256 iw 00abfeh 001ffeh 002000h gs = 17920 iw bs = 3840 iw 003ffeh 004000h 0001feh 000200h 000000h vs = 256 iw 00abfeh gs = 13824 iw bs = 7936 iw 0057feh 0001feh 000200h 000000h vs = 256 iw gs = 11008 iw 00abfeh 0057feh 0001feh 000200h 000000h vs = 256 iw 0007feh 000800h gs = 10240 iw bs = 768 iw 00abfeh 0057feh 0001feh 000200h 000000h vs = 256 iw 001ffeh 002000h gs = 7168 iw bs = 3840 iw 00abfeh 0057feh 003ffeh 004000h 0001feh 000200h 000000h vs = 256 iw gs = 3072 iw bs = 7936 iw 00abfeh
? 2009-2012 microchip technology inc. ds70591e-page 353 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 25.0 instruction set summary the dspic33f instruction set is identical to that of the dspic30f. most instructions are a single program memory word (24 bits). only three instructions require two program memory locations. each single-word instruction is a 24-bit word, divided into an 8-bit opcode, which specifies the instruction type and one or more oper ands, which further specify the operation of the instruction. the instruction set is highly orthogonal and is grouped into five basic categories: ? word or byte-oriented operations ? bit-oriented operations ? literal operations ? dsp operations ? control operations table 25-1 shows the general symbols used in describing the instructions. the dspic33f instruct ion set summary in ta b l e 2 5 - 2 lists all the instructions, along with the status flags affected by each instruction. most word or byte-oriente d w register instructions (including barrel shift instructions) have three operands: ? the first source operand, which is typically a register ?wb? without any address modifier ? the second source operand, which is typically a register ?ws? with or without an address modifier ? the destination of the result, which is typically a register ?wd? with or wit hout an address modifier however, word or byte-oriented file register instructions have two operands: ? the file register specified by the value, ?f? ? the destination, which c ould be either the file register, ?f?, or the w0 register, which is denoted as ?wreg? most bit-oriented instructions (including simple rotate/shift instructions) have two operands: ? the w register (with or without an address modifier) or file register (specified by the value of ?ws? or ?f?) ? the bit in the w register or file register (specified by a literal value or indirectly by the contents of register ?wb?) the literal instructions that involve data movement can use some of the following operands: ? a literal value to be loaded into a w register or file register (specified by ?k?) ? the w register or file register where the literal value is to be loaded (specified by ?wb? or ?f?) however, literal instructions that involve arithmetic or logical operations use some of the following operands: ? the first source operand, which is a register ?wb? without any address modifier ? the second source operand, which is a literal value ? the destination of the result (only if not the same as the first source operand), which is typically a register ?wd? with or without an address modifier the mac class of dsp instructions can use some of the following operands: ? the accumulator (a or b) to be used (required operand) ? the w registers to be used as the two operands ? the x and y address space prefetch operations ? the x and y address space prefetch destinations ? the accumulator write-back destination the other dsp instructions do not involve any multiplication and can include: ? the accumulator to be used (required) ? the source or destination operand (designated as wso or wdo, respectively) with or without an address modifier ? the amount of shift spec ified by a w register, ?wn?, or a literal value the control instructions can use some of the following operands: ? a program memory address ? the mode of the table read and table write instructions note: this data sheet summ arizes the features of the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33f/pic24h family reference manual? . please see the microchip web site ( www.microchip.com ) for the latest ?dspic33f/pic24h family reference manual? sections.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 354 ? 2009-2012 microchip technology inc. most instructions are a single word. certain double-word instructions are designed to provide all the required information in these 48 bits. in the second word, the 8 msbs are ? 0 ?s. if this second word is executed as an instruction (by itself), it will execute as a nop . the double-word instructions execute in two instruction cycles. most single-word instructions are executed in a single instruction cycle, unless a conditional test is true, or the program counter is changed as a result of the instruction. in these cases, the execution takes two instruction cycles with the additional instruction cycle(s) executed as a nop . notable exceptions are the bra (unconditional/computed branch), indirect call/goto , all table reads and writes, and return/retfie instructions, which are single-word instructions but take two or three cycles. certain instructions that involve skipping over the subsequent instruction require either two or three cycles if the skip is performed, depending on whether the instruction being skipped is a single-word or two-word instruction. moreover, double-word moves require two cycles. note: for more details on the instruction set, refer to the ?16-bit mcu and dsc programmer?s reference manual? (ds70157). table 25-1: symbols used in opcode descriptions field description #text means ?literal defined by text ? (text) means ?content of text ? [text] means ?the location addressed by text ? { } optional field or operation register bit field .b byte mode selection .d double-word mode selection .s shadow register select .w word mode selection (default) acc one of two accumulators {a, b} awb accumulator write-back destination address register ?? {w13, [w13]+ = 2} bit4 4-bit bit selection field (us ed in word-addressed instructions) ?? {0...15} c, dc, n, ov, z mcu status bits: carry, digit carry, negative, overflow, sticky zero expr absolute address, label or ex pression (resolved by the linker) f file register address ?? {0x0000...0x1fff} lit1 1-bit unsigned literal ?? {0,1} lit4 4-bit unsigned literal ?? {0...15} lit5 5-bit unsigned literal ?? {0...31} lit8 8-bit unsigned literal ?? {0...255} lit10 10-bit unsigned literal ?? {0...255} for byte mode, {0:1023} for word mode lit14 14-bit unsigned literal ?? {0...16384} lit16 16-bit unsigned literal ?? {0...65535} lit23 23-bit unsigned literal ?? {0...8388608}; lsb must be ? 0 ? none field does not require an entry, can be blank oa, ob, sa, sb dsp status bits: acca overflow, accb overflow, acca saturate, accb saturate pc program counter slit10 10-bit signed literal ?? {-512...511} slit16 16-bit signed literal ?? {-32768...32767} slit6 6-bit signed literal ?? {-16...16} wb base w register ?? {w0..w15} wd destination w register ?? { wd, [wd], [wd++], [wd--], [++wd], [--wd] } wdo destination w register ?? { wnd, [wnd], [wnd++], [wnd--], [++wnd], [--wnd], [wnd+wb] } wm,wn dividend, divisor working r egister pair (direct addressing)
? 2009-2012 microchip technology inc. ds70591e-page 355 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 wm*wm multiplicand and multiplier working register pair for square instructions ?? {w4 * w4,w5 * w5,w6 * w6,w7 * w7} wm*wn multiplicand and multiplier working register pair for dsp instructions ? {w4 * w5,w4 * w6,w4 * w7,w5 * w6,w5 * w7,w6 * w7} wn one of 16 working registers ?? {w0..w15} wnd one of 16 destination working registers ?? {w0...w15} wns one of 16 source working registers ?? {w0...w15} wreg w0 (working register used in file register instructions) ws source w register ?? { ws, [ws], [ws++], [ws- -], [++ws], [--ws] } wso source w register ?? { wns, [wns], [wns++], [wns--], [++wns], [--wns], [wns+wb] } wx x data space prefetch address register for dsp instructions ? {[w8] + = 6, [w8] + = 4, [w8] + = 2, [w8], [w8] - = 6, [w8] - = 4, [w8] - = 2, [w9] + = 6, [w9] + = 4, [w9] + = 2, [w9], [w9] - = 6, [w9] - = 4, [w9] - = 2, [w9 + w12], none} wxd x data space prefetch destinat ion register for dsp instructions ?? {w4...w7} wy y data space prefetch address register for dsp instructions ? {[w10] + = 6, [w10] + = 4, [w10] + = 2, [w10], [w10] - = 6, [w10] - = 4, [w10] - = 2, [w11] + = 6, [w11] + = 4, [w11] + = 2, [w11], [w11] - = 6, [w11] - = 4, [w11] - = 2, [w11 + w12], none} wyd y data space prefetch destination register for dsp instructions ?? {w4...w7} table 25-1: symbols used in opcode descriptions (continued) field description
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 356 ? 2009-2012 microchip technology inc. table 25-2: instruction set overview base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected 1 add add acc add accumulators 1 1 oa,ob,sa,sb add f f = f + wreg 1 1 c,dc,n,ov,z add f,wreg wreg = f + wreg 1 1 c,dc,n,ov,z add #lit10,wn wd = lit10 + wd 1 1 c,dc,n,ov,z add wb,ws,wd wd = wb + ws 1 1 c,dc,n,ov,z add wb,#lit5,wd wd = wb + lit5 1 1 c,dc,n,ov,z add wso,#slit4,acc 16-bit signed add to accumulator 1 1 oa,ob,sa,sb 2 addc addc f f = f + wreg + (c) 1 1 c,dc,n,ov,z addc f,wreg wreg = f + wreg + (c) 1 1 c,dc,n,ov,z addc #lit10,wn wd = lit10 + wd + (c) 1 1 c,dc,n,ov,z addc wb,ws,wd wd = wb + ws + (c) 1 1 c,dc,n,ov,z addc wb,#lit5,wd wd = wb + lit5 + (c) 1 1 c,dc,n,ov,z 3 and and f f = f .and. wreg 1 1 n,z and f,wreg wreg = f .and. wreg 1 1 n,z and #lit10,wn wd = lit10 .and. wd 1 1 n,z and wb,ws,wd wd = wb .and. ws 1 1 n,z and wb,#lit5,wd wd = wb .and. lit5 1 1 n,z 4 asr asr f f = arithmetic right shift f 1 1 c,n,ov,z asr f,wreg wreg = arithmetic right shift f 1 1 c,n,ov,z asr ws,wd wd = arithmetic right shift ws 1 1 c,n,ov,z asr wb,wns,wnd wnd = arithmetic right shift wb by wns 1 1 n,z asr wb,#lit5,wnd wnd = arithmetic right shift wb by lit5 1 1 n,z 5 bclr bclr f,#bit4 bit clear f 1 1 none bclr ws,#bit4 bit clear ws 1 1 none 6 bra bra c,expr branch if carry 1 1 (2) none bra ge,expr branch if greater than or equal 1 1 (2) none bra geu,expr branch if unsigned greater than or equal 1 1 (2) none bra gt,expr branch if greater than 1 1 (2) none bra gtu,expr branch if unsigned greater than 1 1 (2) none bra le,expr branch if less than or equal 1 1 (2) none bra leu,expr branch if unsigned less than or equal 1 1 (2) none bra lt,expr branch if less than 1 1 (2) none bra ltu,expr branch if unsigned less than 1 1 (2) none bra n,expr branch if negative 1 1 (2) none bra nc,expr branch if not carry 1 1 (2) none bra nn,expr branch if not negative 1 1 (2) none bra nov,expr branch if not overflow 1 1 (2) none bra nz,expr branch if not zero 1 1 (2) none bra oa,expr branch if accumulator a overflow 1 1 (2) none bra ob,expr branch if accumulator b overflow 1 1 (2) none bra ov,expr branch if overflow 1 1 (2) none bra sa,expr branch if accumulator a saturated 1 1 (2) none bra sb,expr branch if accumulator b saturated 1 1 (2) none bra expr branch unconditionally 1 2 none bra z,expr branch if zero 1 1 (2) none bra wn computed branch 1 2 none 7 bset bset f,#bit4 bit set f 1 1 none bset ws,#bit4 bit set ws 1 1 none 8 bsw bsw.c ws,wb write c bit to ws 1 1 none bsw.z ws,wb write z bit to ws 1 1 none
? 2009-2012 microchip technology inc. ds70591e-page 357 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 9 btg btg f,#bit4 bit toggle f 1 1 none btg ws,#bit4 bit toggle ws 1 1 none 10 btsc btsc f,#bit4 bit test f, skip if clear 1 1 (2 or 3) none btsc ws,#bit4 bit test ws, skip if clear 1 1 (2 or 3) none 11 btss btss f,#bit4 bit test f, skip if set 1 1 (2 or 3) none btss ws,#bit4 bit test ws, skip if set 1 1 (2 or 3) none 12 btst btst f,#bit4 bit test f 1 1 z btst.c ws,#bit4 bit test ws to c 1 1 c btst.z ws,#bit4 bit test ws to z 1 1 z btst.c ws,wb bit test ws to c 1 1 c btst.z ws,wb bit test ws to z 1 1 z 13 btsts btsts f,#bit4 bit test then set f 1 1 z btsts.c ws,#bit4 bit test ws to c, then set 1 1 c btsts.z ws,#bit4 bit test ws to z, then set 1 1 z 14 call call lit23 call subroutine 2 2 none call wn call indirect subroutine 1 2 none 15 clr clr f f = 0x0000 1 1 none clr wreg wreg = 0x0000 1 1 none clr ws ws = 0x0000 1 1 none clr acc,wx,wxd,wy,wyd,awb clear accumulator 1 1 oa,ob,sa,sb 16 clrwdt clrwdt clear watchdog timer 1 1 wdto,sleep 17 com com f f = f 11 n,z com f,wreg wreg = f 11 n,z com ws,wd wd = ws 11 n,z 18 cp cp f compare f with wreg 1 1 c,dc,n,ov,z cp wb,#lit5 compare wb with lit5 1 1 c,dc,n,ov,z cp wb,ws compare wb with ws (wb ? ws) 1 1 c,dc,n,ov,z 19 cp0 cp0 f compare f with 0x0000 1 1 c,dc,n,ov,z cp0 ws compare ws with 0x0000 1 1 c,dc,n,ov,z 20 cpb cpb f compare f with wreg, with borrow 1 1 c,dc,n,ov,z cpb wb,#lit5 compare wb with lit5, wit h borrow 1 1 c,dc,n,ov,z cpb wb,ws compare wb with ws, with borrow (wb ? ws ? c ) 1 1 c,dc,n,ov,z 21 cpseq cpseq wb, wn compare wb with wn, skip if = 1 1 (2 or 3) none 22 cpsgt cpsgt wb, wn compare wb with wn, skip if > 1 1 (2 or 3) none 23 cpslt cpslt wb, wn compare wb with wn, skip if < 1 1 (2 or 3) none 24 cpsne cpsne wb, wn compare wb with wn, skip if ? 11 (2 or 3) none 25 daw daw wn wn = decimal adjust wn 1 1 c 26 dec dec f f = f ? 1 1 1 c,dc,n,ov,z dec f,wreg wreg = f ? 1 1 1 c,dc,n,ov,z dec ws,wd wd = ws ? 1 1 1 c,dc,n,ov,z 27 dec2 dec2 f f = f ? 2 1 1 c,dc,n,ov,z dec2 f,wreg wreg = f ? 2 1 1 c,dc,n,ov,z dec2 ws,wd wd = ws ? 2 1 1 c,dc,n,ov,z 28 disi disi #lit14 disable interrupts for k instruction cycles 1 1 none table 25-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 358 ? 2009-2012 microchip technology inc. 29 div div.s wm,wn signed 16/16-bit integer divide 1 18 n,z,c,ov div.sd wm,wn signed 32/16-bit integer divide 1 18 n,z,c,ov div.u wm,wn unsigned 16/16-bit integer divide 1 18 n,z,c,ov div.ud wm,wn unsigned 32/16-bit integer divide 1 18 n,z,c,ov 30 divf divf wm,wn signed 16/16-bit fractional divide 1 18 n,z,c,ov 31 do do #lit14,expr do code to pc + expr, lit14 + 1 times 2 2 none do wn,expr do code to pc + expr, (wn) + 1 times 2 2 none 32 ed ed wm*wm,acc,wx,wy,wxd euclidean distance (no accumulate) 1 1 oa,ob,oab, sa,sb,sab 33 edac edac wm*wm,acc,wx,wy,wxd euclidean distance 1 1 oa,ob,oab, sa,sb,sab 34 exch exch wns,wnd swap wns with wnd 1 1 none 35 fbcl fbcl ws,wnd find bit change from left (msb) side 1 1 c 36 ff1l ff1l ws,wnd find first one from left (msb) side 1 1 c 37 ff1r ff1r ws,wnd find first one from right (lsb) side 1 1 c 38 goto goto expr go to address 2 2 none goto wn go to indirect 1 2 none 39 inc inc f f = f + 1 1 1 c,dc,n,ov,z inc f,wreg wreg = f + 1 1 1 c,dc,n,ov,z inc ws,wd wd = ws + 1 1 1 c,dc,n,ov,z 40 inc2 inc2 f f = f + 2 1 1 c,dc,n,ov,z inc2 f,wreg wreg = f + 2 1 1 c,dc,n,ov,z inc2 ws,wd wd = ws + 2 1 1 c,dc,n,ov,z 41 ior ior f f = f .ior. wreg 1 1 n,z ior f,wreg wreg = f .ior. wreg 1 1 n,z ior #lit10,wn wd = lit10 .ior. wd 1 1 n,z ior wb,ws,wd wd = wb .ior. ws 1 1 n,z ior wb,#lit5,wd wd = wb .ior. lit5 1 1 n,z 42 lac lac wso,#slit4,acc load accumulator 1 1 oa,ob,oab, sa,sb,sab 43 lnk lnk #lit14 link frame pointer 1 1 none 44 lsr lsr f f = logical right shift f 1 1 c,n,ov,z lsr f,wreg wreg = logical right shift f 1 1 c,n,ov,z lsr ws,wd wd = logical right shift ws 1 1 c,n,ov,z lsr wb,wns,wnd wnd = logical right shift wb by wns 1 1 n,z lsr wb,#lit5,wnd wnd = logical right shift wb by lit5 1 1 n,z 45 mac mac wm*wn,acc,wx,wxd,wy,wyd , awb multiply and accumulate 1 1 oa,ob,oab, sa,sb,sab mac wm*wm,acc,wx,wxd,wy,wyd square and accumulate 1 1 oa,ob,oab, sa,sb,sab 46 mov mov f,wn move f to wn 1 1 none mov f move f to f 1 1 n,z mov f,wreg move f to wreg 1 1 none mov #lit16,wn move 16-bit literal to wn 1 1 none mov.b #lit8,wn move 8-bit literal to wn 1 1 none mov wn,f move wn to f 1 1 none mov wso,wdo move ws to wd 1 1 none mov wreg,f move wreg to f 1 1 none mov.d wns,wd move double from w(ns):w(ns + 1) to wd 1 2 none mov.d ws,wnd move double from ws to w(nd + 1):w(nd) 1 2 none 47 movsac movsac acc,wx,wxd,wy,wyd,awb prefetch and store accumulator 1 1 none table 25-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected
? 2009-2012 microchip technology inc. ds70591e-page 359 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 48 mpy mpy wm*wn,acc,wx,wxd,wy,wyd multiply wm by wn to accumulator 1 1 oa,ob,oab, sa,sb,sab mpy wm*wm,acc,wx,wxd,wy,wyd square wm to accumulator 1 1 oa,ob,oab, sa,sb,sab 49 mpy.n mpy.n wm*wn,acc,wx,wxd,wy,wyd -(multiply wm by wn) to accumulator 1 1 none 50 msc msc wm*wm,acc,wx,wxd,wy,wyd , awb multiply and subtract from accumulator 1 1 oa,ob,oab, sa,sb,sab 51 mul mul.ss wb,ws,wnd {wnd + 1, wnd} = signed(wb) * signed(ws) 1 1 none mul.su wb,ws,wnd {wnd + 1, wnd} = signed(wb) * unsigned(ws) 1 1 none mul.us wb,ws,wnd {wnd + 1, wnd} = unsigned(wb) * signed(ws) 1 1 none mul.uu wb,ws,wnd {wnd + 1, wnd} = unsigned(wb) * unsigned(ws) 1 1 none mul.su wb,#lit5,wnd {wnd + 1, wnd} = signed(wb) * unsigned(lit5) 1 1 none mul.uu wb,#lit5,wnd {wnd + 1, wnd} = unsigned(wb) * unsigned(lit5) 1 1 none mul f w3:w2 = f * wreg 1 1 none 52 neg neg acc negate accumulator 1 1 oa,ob,oab, sa,sb,sab neg f f = f + 1 1 1 c,dc,n,ov,z neg f,wreg wreg = f + 1 1 1 c,dc,n,ov,z neg ws,wd wd = ws + 1 1 1 c,dc,n,ov,z 53 nop nop no operation 1 1 none nopr no operation 1 1 none 54 pop pop f pop f from top-of-stack (tos) 1 1 none pop wdo pop from top-of-stack (tos) to wdo 1 1 none pop.d wnd pop from top-of-stack (tos) to w(nd):w(nd + 1) 1 2 none pop.s pop shadow registers 1 1 all 55 push push f push f to top-of-stack (tos) 1 1 none push wso push wso to top-of-stack (tos) 1 1 none push.d wns push w(ns):w(ns + 1) to top-of-stack (tos) 1 2 none push.s push shadow registers 1 1 none 56 pwrsav pwrsav #lit1 go into sleep or idle mode 1 1 wdto,sleep 57 rcall rcall expr relative call 1 2 none rcall wn computed call 1 2 none 58 repeat repeat #lit14 repeat next instruction lit14 + 1 times 1 1 none repeat wn repeat next instruction (wn) + 1 times 1 1 none 59 reset reset software device reset 1 1 none 60 retfie retfie return from interrupt 1 3 (2) none 61 retlw retlw #lit10,wn return with literal in wn 1 3 (2) none 62 return return return from subroutine 1 3 (2) none 63 rlc rlc f f = rotate left through carry f 1 1 c,n,z rlc f,wreg wreg = rotate left through carry f 1 1 c,n,z rlc ws,wd wd = rotate left through carry ws 1 1 c,n,z 64 rlnc rlnc f f = rotate left (no carry) f 1 1 n,z rlnc f,wreg wreg = rotate left (no carry) f 1 1 n,z rlnc ws,wd wd = rotate left (no carry) ws 1 1 n,z 65 rrc rrc f f = rotate right through carry f 1 1 c,n,z rrc f,wreg wreg = rotate right through carry f 1 1 c,n,z rrc ws,wd wd = rotate right through carry ws 1 1 c,n,z table 25-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 360 ? 2009-2012 microchip technology inc. 66 rrnc rrnc f f = rotate right (no carry) f 1 1 n,z rrnc f,wreg wreg = rotate right (no carry) f 1 1 n,z rrnc ws,wd wd = rotate right (no carry) ws 1 1 n,z 67 sac sac acc,#slit4,wdo store accumulator 1 1 none sac.r acc,#slit4,wdo store rounded accumulator 1 1 none 68 se se ws,wnd wnd = sign-extended ws 1 1 c,n,z 69 setm setm f f = 0xffff 1 1 none setm wreg wreg = 0xffff 1 1 none setm ws ws = 0xffff 1 1 none 70 sftac sftac acc,wn arithmetic shift accumulator by (wn) 1 1 oa,ob,oab, sa,sb,sab sftac acc,#slit6 arithmetic shift accumulator by slit6 1 1 oa,ob,oab, sa,sb,sab 71 sl sl f f = left shift f 1 1 c,n,ov,z sl f,wreg wreg = left shift f 1 1 c,n,ov,z sl ws,wd wd = left shift ws 1 1 c,n,ov,z sl wb,wns,wnd wnd = left shift wb by wns 1 1 n,z sl wb,#lit5,wnd wnd = left shift wb by lit5 1 1 n,z 72 sub sub acc subtract accumulators 1 1 oa,ob,oab, sa,sb,sab sub f f = f ? wreg 1 1 c,dc,n,ov,z sub f,wreg wreg = f ? wreg 1 1 c,dc,n,ov,z sub #lit10,wn wn = wn ? lit10 1 1 c,dc,n,ov,z sub wb,ws,wd wd = wb ? ws 1 1 c,dc,n,ov,z sub wb,#lit5,wd wd = wb ? lit5 1 1 c,dc,n,ov,z 73 subb subb f f = f ? wreg ? (c ) 1 1 c,dc,n,ov,z subb f,wreg wreg = f ? wreg ? (c ) 1 1 c,dc,n,ov,z subb #lit10,wn wn = wn ? lit10 ? (c ) 1 1 c,dc,n,ov,z subb wb,ws,wd wd = wb ? ws ? (c ) 1 1 c,dc,n,ov,z subb wb,#lit5,wd wd = wb ? lit5 ? (c ) 1 1 c,dc,n,ov,z 74 subr subr f f = wreg ? f 1 1 c,dc,n,ov,z subr f,wreg wreg = wreg ? f 1 1 c,dc,n,ov,z subr wb,ws,wd wd = ws ? wb 1 1 c,dc,n,ov,z subr wb,#lit5,wd wd = lit5 ? wb 1 1 c,dc,n,ov,z 75 subbr subbr f f = wreg ? f ? (c ) 1 1 c,dc,n,ov,z subbr f,wreg wreg = wreg ? f ? (c ) 1 1 c,dc,n,ov,z subbr wb,ws,wd wd = ws ? wb ? (c ) 1 1 c,dc,n,ov,z subbr wb,#lit5,wd wd = lit5 ? wb ? (c ) 1 1 c,dc,n,ov,z 76 swap swap.b wn wn = nibble swap wn 1 1 none swap wn wn = byte swap wn 1 1 none 77 tblrdh tblrdh ws,wd read prog<23:16> to wd<7:0> 1 2 none 78 tblrdl tblrdl ws,wd read prog<15:0> to wd 1 2 none 79 tblwth tblwth ws,wd write ws<7:0> to prog<23:16> 1 2 none 80 tblwtl tblwtl ws,wd write ws to prog<15:0> 1 2 none 81 ulnk ulnk unlink frame pointer 1 1 none 82 xor xor f f = f .xor. wreg 1 1 n,z xor f,wreg wreg = f .xor. wreg 1 1 n,z xor #lit10,wn wd = lit10 .xor. wd 1 1 n,z xor wb,ws,wd wd = wb .xor. ws 1 1 n,z xor wb,#lit5,wd wd = wb .xor. lit5 1 1 n,z 83 ze ze ws,wnd wnd = zero-extend ws 1 1 c,z,n table 25-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected
? 2009-2012 microchip technology inc. ds70591e-page 361 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 26.0 development support the pic ? microcontrollers and dspic ? digital signal controllers are supported with a full range of software and hardware development tools: ? integrated development environment - mplab ? ide software ? compilers/assemblers/linkers - mplab c compiler for various device families - hi-tech c ? for various device families - mpasm tm assembler -mplink tm object linker/ mplib tm object librarian - mplab assembler/link er/librarian for various device families ? simulators - mplab sim software simulator ? emulators - mplab real ice? in-circuit emulator ? in-circuit debuggers - mplab icd 3 - pickit? 3 debug express ? device programmers - pickit? 2 programmer - mplab pm3 device programmer ? low-cost demonstratio n/development boards, evaluation kits, and starter kits 26.1 mplab integrated development environment software the mplab ide software brings an ease of software development previously unseen in the 8/16/32-bit microcontroller market. the mplab ide is a windows ? operating system-based app lication that contains: ? a single graphical interface to all debugging tools - simulator - programmer (sold separately) - in-circuit emulator (sold separately) - in-circuit debugger (sold separately) ? a full-featured editor with color-coded context ? a multiple project manager ? customizable data windows with direct edit of contents ? high-level source code debugging ? mouse over variable inspection ? drag and drop variables from source to watch windows ? extensive on-line help ? integration of select thir d party tools, such as iar c compilers the mplab ide allows you to: ? edit your source files (either c or assembly) ? one-touch compile or assemble, and download to emulator and simulator tools (automatically updates all project information) ? debug using: - source files (c or assembly) - mixed c and assembly - machine code mplab ide supports multiple debugging tools in a single development paradigm, from the cost-effective simulators, through low-cost in-circuit debuggers, to full-featured emulators. this eliminates the learning curve when upgrading to tools with increased flexibility and power.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 362 ? 2009-2012 microchip technology inc. 26.2 mplab c compilers for various device families the mplab c compiler code development systems are complete ansi c compilers for microchip?s pic18, pic24 and pic32 families of microcontrollers and the dspic30 and dspic33 families of digital signal control- lers. these compilers provide powerful integration capabilities, superior code optimization and ease of use. for easy source level debugging, the compilers provide symbol information that is optimized to the mplab ide debugger. 26.3 hi-tech c for various device families the hi-tech c compiler code development systems are complete ansi c comp ilers for microchip?s pic family of microcontrollers and the dspic family of digital signal controllers. these compilers provide powerful integration capabilities, omniscient code generation and ease of use. for easy source level debugging, the compilers provide symbol information that is optimized to the mplab ide debugger. the compilers include a macro assembler, linker, pre- processor, and one-step driver, and can run on multiple platforms. 26.4 mpasm assembler the mpasm assembler is a full-featured, universal macro assembler for pic10/12/16/18 mcus. the mpasm assembler generates relocatable object files for the mplink object linker, intel ? standard hex files, map files to detail memory usage and symbol reference, absolute lst files that contain source lines and generated machine code and coff files for debugging. the mpasm assembler features include: ? integration into mplab ide projects ? user-defined macros to streamline assembly code ? conditional assembly for multi-purpose source files ? directives that allow complete control over the assembly process 26.5 mplink object linker/ mplib object librarian the mplink object linker combines relocatable objects created by the mpasm assembler and the mplab c18 c compiler. it can link relocatable objects from precompiled libraries, using directives from a linker script. the mplib object librarian manages the creation and modification of library files of precompiled code. when a routine from a library is called from a source file, only the modules that contain that routine will be linked in with the application. this allows large libraries to be used efficiently in many different applications. the object linker/libra ry features include: ? efficient linking of single libraries instead of many smaller files ? enhanced code maintainability by grouping related modules together ? flexible creation of libraries with easy module listing, replacement, deletion and extraction 26.6 mplab assembler, linker and librarian for various device families mplab assembler produces relocatable machine code from symbolic assembly language for pic24, pic32 and dspic devices. mplab c compiler uses the assembler to produce its object file. the assembler generates relocatable objec t files that can then be archived or linked with other relocatable object files and archives to create an execut able file. notable features of the assembler include: ? support for the entire device instruction set ? support for fixed-point and floating-point data ? command line interface ? rich directive set ? flexible macro language ? mplab ide compatibility
? 2009-2012 microchip technology inc. ds70591e-page 363 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 26.7 mplab sim software simulator the mplab sim software simulator allows code development in a pc-hosted environment by simulat- ing the pic mcus and dspic ? dscs on an instruction level. on any given instruction, the data areas can be examined or modified and stimuli can be applied from a comprehensive stimulus c ontroller. registers can be logged to files for further run-time analysis. the trace buffer and logic analyzer display extend the power of the simulator to record and track program execution, actions on i/o, most peripherals and internal registers. the mplab sim software simulator fully supports symbolic debugging using the mplab c compilers, and the mpasm and mplab assemblers. the soft- ware simulator offers the flexibility to develop and debug code outside of the hardware laboratory envi- ronment, making it an excellent, economical software development tool. 26.8 mplab real ice in-circuit emulator system mplab real ice in-circuit emulator system is microchip?s next generation high-speed emulator for microchip flash dsc and mcu devices. it debugs and programs pic ? flash mcus and dspic ? flash dscs with the easy-to-use, powerful graphical user interface of the mplab integrated devel opment environment (ide), included with each kit. the emulator is connected to the design engineer?s pc using a high-speed usb 2.0 interface and is connected to the target with either a connector compatible with in- circuit debugger systems (rj11) or with the new high- speed, noise tolerant, low-voltage differential signal (lvds) interconnection (cat5). the emulator is field upgradable through future firmware downloads in mplab ide. in upcoming releases of mplab ide, new devices will be supported, and new features will be added. mplab real ice offers significant advantages over competitive emulators including low-cost, full-speed emulation, run-time variable watches, trace analysis, complex breakpoints, a ruggedized probe interface and long (up to three meters) interconnection cables. 26.9 mplab icd 3 in-circuit debugger system mplab icd 3 in-circuit debugger system is micro- chip?s most cost effective high-speed hardware debugger/programmer for microchip flash digital sig- nal controller (dsc) and microcontroller (mcu) devices. it debugs and programs pic ? flash microcon- trollers and dspic ? dscs with the powerful, yet easy- to-use graphical user interface of mplab integrated development environment (ide). the mplab icd 3 in-circuit debugger probe is con- nected to the design engineer?s pc using a high-speed usb 2.0 interface and is connected to the target with a connector compatible with the mplab icd 2 or mplab real ice systems (rj-11). mplab icd 3 supports all mplab icd 2 headers. 26.10 pickit 3 in-circuit debugger/ programmer and pickit 3 debug express the mplab pickit 3 allows debugging and program- ming of pic ? and dspic ? flash microcontrollers at a most affordable price point using the powerful graphical user interface of the mp lab integrated development environment (ide). the mplab pickit 3 is connected to the design engineer?s pc using a full speed usb interface and can be connec ted to the target via an microchip debug (rj-11) connector (compatible with mplab icd 3 and mplab real ice). the connector uses two device i/o pins and the reset line to imple- ment in-circuit debugging and in-circuit serial pro- gramming?. the pickit 3 debug express include the pickit 3, demo board and microcontroller, hookup cables and cdrom with user?s guide, lessons, tutorial, compiler and mplab ide software.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 364 ? 2009-2012 microchip technology inc. 26.11 pickit 2 development programmer/debugger and pickit 2 debug express the pickit? 2 development programmer/debugger is a low-cost development tool with an easy to use inter- face for programming and debugging microchip?s flash families of microcontrollers. the full featured windows ? programming interface supports baseline (pic10f, pic12f5xx, pic16f5xx), midrange (pic12f6xx, pic16f), pic18f, pic24, dspic30, dspic33, and pic32 families of 8-bit, 16-bit, and 32-bit microcontrollers, and many microchip serial eeprom products. with microchip?s powerful mplab integrated development environmen t (ide) the pickit? 2 enables in-circuit debugging on most pic ? microcon- trollers. in-circuit-debugging runs, halts and single steps the program while the pic microcontroller is embedded in the applicatio n. when halted at a break- point, the file registers ca n be examined and modified. the pickit 2 debug express include the pickit 2, demo board and microcontroller, hookup cables and cdrom with user?s guide, lessons, tutorial, compiler and mplab ide software. 26.12 mplab pm3 device programmer the mplab pm3 device programmer is a universal, ce compliant device programmer with programmable voltage verification at v ddmin and v ddmax for maximum reliability. it features a large lcd display (128 x 64) for menus and error messages and a modu- lar, detachable socket asse mbly to support various package types. the icsp? ca ble assembly is included as a standard item. in stand-alone mode, the mplab pm3 device programmer can read, verify and program pic devices without a pc co nnection. it can also set code protection in this mode. the mplab pm3 connects to the host pc via an rs-232 or usb cable. the mplab pm3 has high-speed communications and optimized algorithms for quick programming of large memory devices and incorpor ates an mmc card for file storage and data applications. 26.13 demonstration/development boards, evaluation kits, and starter kits a wide variety of demonstr ation, development and evaluation boards for various pic mcus and dspic dscs allows quick application development on fully func- tional systems. most boards include prototyping areas for adding custom circuitry and provide application firmware and source code for examination and modification. the boards support a variety of features, including leds, temperature sensors, sw itches, speakers, rs-232 interfaces, lcd displays, potentiometers and additional eeprom memory. the demonstration and development boards can be used in teaching environments, for prototyping custom circuits and for learning about various microcontroller applications. in addition to the picdem? and dspicdem? demon- stration/development board series of circuits, microchip has a line of evaluation kits and demonstration software for analog filter design, k ee l oq ? security ics, can, irda ? , powersmart battery management, seeval ? evaluation system, sigma-delta adc, flow rate sensing, plus many more. also available are starter kits that contain everything needed to experience the specified device. this usually includes a single application and debug capability, all on one board. check the microchip web page ( www.microchip.com ) for the complete list of demonstration, development and evaluation kits.
? 2009-2012 microchip technology inc. ds70591e-page 365 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 27.0 electrical characteristics this section provides an overview of dspic33f j32gs406/606/608/610 and ds pic33fj64gs406/606/608/610 electrical characteristics. additional information will be prov ided in future revisions of this document as it becomes available. absolute maximum ratings for the dspic33fj32gs406/606 /608/610 and dspic33fj64gs406/606/608/610 family are listed below. exposure to these maximum ra ting conditions for extended periods ma y affect device reliability. functional operation of the device at these or any other conditions above the parameters indicated in the operation listings of this specification is not implied. absolute maximum ratings ( 1 ) ambient temperature under bias................................................................................................. ............-40c to +125c storage temperature ............................................................................................................ .................. -65c to +150c voltage on v dd with respect to v ss ......................................................................................................... -0.3v to +4.0v voltage on any pin that is not 5v tolerant with respect to v ss ( 3 ) .................................................... -0.3v to (v dd + 0.3v) voltage on any 5v tolerant pin with respect to v ss when v dd ? 3.0v ( 3 ) .................................................. -0.3v to +5.6v voltage on any 5v tolerant pin with respect to v ss when v dd < 3.0v ( 3 ) ......................................... -0.3v to (v dd + 0.3v) maximum current out of v ss pin ........................................................................................................................... 300 ma maximum current into v dd pin ( 2 ) ...........................................................................................................................250 ma maximum current sourced/sunk by any 4x i/o pin ..... ............................................................................ .................15 ma maximum current sourced/sunk by any 8x i/o pin ..... ............................................................................ .................25 ma maximum current sourced/sunk by any 16x i/o pin ...... .......................................................................... ................45 ma maximum current sunk by all ports ......................... ..................................................................... .........................200 ma maximum current sourced by all ports ( 2 ) ...............................................................................................................200 ma note 1: stresses above those listed under ?absolute maximu m ratings? may cause permanent damage to the device. this is a stress rating only, and functional o peration of the device at th ose or any other conditions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. 2: maximum allowable current is a function of the device maximum power dissipation (see table 27-2 ). 3: see the ? pin diagrams ? section for 5v tolerant pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 366 ? 2009-2012 microchip technology inc. 27.1 dc characteristics table 27-1: operating mips vs. voltage characteristic v dd range (in volts) temp range (in c) max mips dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 ? 3.0-3.6v ( 1 ) -40c to +85c 40 ? 3.0-3.6v ( 1 ) -40c to +125c 40 note 1: overall functional device operation at v bormin < v dd < v ddmin is tested but not characterized. all device analog modules, such as the adc, etc., will function but with degraded performance below v ddmin . see parameter bo10 in table 27-11 for the bor values. table 27-2: thermal operating conditions rating symbol min typ max unit industrial temperature devices operating junction temperature range t j -40 ? +125 c operating ambient temperature range t a -40 ? +85 c extended temperature devices operating junction temperature range t j -40 ? +140 c operating ambient temperature range t a -40 ? +125 c power dissipation: internal chip power dissipation: p int = v dd x (i dd ? ? i oh ) p d p int + p i / o w i/o pin power dissipation: i/o = ? ({v dd ? v oh } x i oh ) + ? (v ol x i ol ) maximum allowed power dissipation p dmax (t j ? t a )/ ? ja w table 27-3: thermal packaging characteristics characteristic symbol typ max unit notes package thermal resistance, 64-pin qfn (9x9x0.9 mm) ? ja 28 ? c/w 1 package thermal resistance, 64-pin tqfp (10x10x1 mm) ? ja 39 ? c/w 1 package thermal resistance, 80-pin tqfp (12x12x1 mm) ? ja 53.1 ? c/w 1 package thermal resistance, 100-pin tqfp (12x12x1 mm) ? ja 43 ? c/w 1 package thermal resistance, 100-pin tqfp (14x14x1 mm) ? ja 43 ? c/w 1 note 1: junction to ambient thermal resistance, theta- ja ( ? ja ) numbers are achieved by package simulations.
? 2009-2012 microchip technology inc. ds70591e-page 367 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-4: dc temperature and voltage specifications dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions operating voltage dc10 v dd supply voltag e ( 4 ) 3.0 ? 3.6 v industrial and extended dc12 v dr ram data retention voltage ( 2 ) 1.8 ? ? v dc16 v por v dd start voltage to ensure internal power-on reset signal ??v ss v dc17 s vdd v dd rise rate ( 3 ) to ensure internal power-on reset signal 0.03 ? ? v/ms 0-3.0v in 0.1s note 1: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 2: this is the limit to which v dd may be lowered without losing ram data. 3: these parameters are characterized but not tested in manufacturing. 4: overall functional device operation at v bormin < v dd < v ddmin is tested but not char acterized. all device analog modules such as the adc, etc., will fu nction but with degraded performance below v ddmin . see parameter bo10 in table 27-11 for the bor values.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 368 ? 2009-2012 microchip technology inc. table 27-5: dc characteristics: operating current (i dd ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typical ( 1 ) max units conditions operating current (i dd ) ( 2 ) dc20d 21 30 ma -40c 3.3v 10 mips see note 2 dc20a 21 30 ma +25c dc20b 21 30 ma +85c dc20c 22 30 ma +125c dc21d 28 40 ma -40c 3.3v 16 mips see note 2 and 3 dc21a 28 40 ma +25c dc21b 28 40 ma +85c dc21c 29 40 ma +125c dc22d 35 45 ma -40c 3.3v 20 mips see note 2 and 3 dc22a 35 45 ma +25c dc22b 35 45 ma +85c dc22c 36 45 ma +125c dc23d 49 60 ma -40c 3.3v 30 mips see note 2 and 3 dc23a 49 60 ma +25c dc23b 49 60 ma +85c dc23c 50 60 ma +125c dc24d 66 75 ma -40c 3.3v 40 mips see note 2 dc24a 66 75 ma +25c dc24b 66 75 ma +85c dc24c 67 75 ma +125c dc25d 153 170 ma -40c 3.3v 40 mips see note 2 and 3 , except pwm is operating at maximum speed (ptcon2 = 0x0000) dc25a 154 170 ma +25c dc25b 155 170 ma +85c dc25c 156 170 ma +125c note 1: data in ?typical? column is at 3.3v, +25c unless otherwise stated. 2: i dd is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code exec ution pattern and temperatur e, also have an impact on the current consumption. t he test conditions for all i dd measurements are as follows: ? oscillator is configured in ec mode with pll, os c1 is driven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? cpu, sram, program memory and data memory are operational ? no peripheral modules are operating; however, every peripheral is being clocked (all pmdx bits are all ? 0 ?s) ? cpu executing while(1) statement ? jtag disabled 3: these parameters are characterized but not tested in manufacturing.
? 2009-2012 microchip technology inc. ds70591e-page 369 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 dc26d 122 135 ma -40c 3.3v 40 mips see note 2 and 3 , except pwm is operating at 1/2 speed (ptcon2 = 0x0001) dc26a 123 135 ma +25c dc26b 124 135 ma +85c dc26c 125 135 ma +125c dc27d 107 120 ma -40c 3.3v 40 mips see note 2 and 3 , except pwm is operating at 1/4 speed (ptcon2 = 0x0002) dc27a 108 120 ma +25c dc27b 109 120 ma +85c dc27c 110 120 ma +125c dc28d 88 100 ma -40c 3.3v 40 mips see note 2 and 3 , except pwm is operating at 1/8 speed (ptcon2 = 0x0003) dc28a 89 100 ma +25c dc28b 89 100 ma +85c dc28c 89 100 ma +125c table 27-5: dc characteristics: operating current (i dd ) (continued) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typical ( 1 ) max units conditions operating current (i dd ) ( 2 ) note 1: data in ?typical? column is at 3.3v, +25c unless otherwise stated. 2: i dd is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillato r type, internal code execution pattern and temperature, also have an impact on the current consumption. t he test conditions for all i dd measurements are as follows: ? oscillator is configured in ec mode with pll, os c1 is driven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? cpu, sram, program memory and data memory are operational ? no peripheral modules are operating; however, every peripheral is being clocked (all pmdx bits are all ? 0 ?s) ? cpu executing while(1) statement ? jtag disabled 3: these parameters are characterized but not tested in manufacturing.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 370 ? 2009-2012 microchip technology inc. table 27-6: dc characteristics: idle current (i idle ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typical ( 1 ) max units conditions idle current (i idle ): core off, clock on base current ( 2 ) dc40d 8 15 ma -40c 3.3v 10 mips dc40a 9 15 ma +25c dc40b 9 15 ma +85c dc40c 10 15 ma +125c dc41d 11 20 ma -40c 3.3v 16 mips ( 3 ) dc41a 11 ma +25c 20 dc41b 11 20 ma +85c dc41c 12 20 ma +125c dc42d 14 25 ma -40c 3.3v 20 mips ( 3 ) dc42a 14 25 ma +25c dc42b 14 25 ma +85c dc42c 15 25 ma +125c dc43d 20 30 ma -40c 3.3v 30 mips ( 3 ) dc43a 20 30 ma +25c dc43b 21 30 ma +85c dc43c 22 30 ma +125c dc44d 29 40 ma -40c 3.3v 40 mips dc44a 29 40 ma +25c dc44b 30 40 ma +85c dc44c 31 40 ma +125c note 1: data in ?typical? column is at 3.3v, +25c unless otherwise stated. 2: base idle current (i idle ) is measured as follows: ? cpu core is off, oscillator is configured in ec mo de and external clock is active, osc1 is driven with external square wave from rail-to-rail (ec clock overshoot/unders hoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? no peripheral modules are operating; however, ever y peripheral is being clocked (all pmdx bits are all ? 0 ?s) ? jtag is disabled 3: these parameters are characterized but not tested in manufacturing.
? 2009-2012 microchip technology inc. ds70591e-page 371 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-7: dc characteristics: power-down current (i pd ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typical ( 1 ) max units conditions power-down current (i pd ) ( 2 , 4 ) dc60d 50 200 ? a -40c 3.3v base power-down current dc60a 50 200 ? a +25c dc60b 200 500 ? a +85c dc60c 600 1000 ? a +125c dc61d 8 13 ? a -40c 3.3v watchdog timer current: ? i wdt ( 3 ) dc61a 10 15 ? a +25c dc61b 12 20 ? a +85c dc61c 13 25 ? a +125c note 1: data in the typical column is at 3.3v, +25c unless otherwise stated. 2: i pd (sleep) current is measured as follows: ? cpu core is off, oscillator is configured in ec mode and external clock is active, osc1 is driven with external square wave from rail-to-rail (ec clock overshoot/ undershoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? all peripheral modules are disabled (all pmdx bits are all ? 1 ?s) ? the vregs bit (rcon<8>) = 0 (i.e., core regulator is set to st andby while the device is in sleep mode) ? jtag disabled 3: the ? current is the additional current consumed when the wdt module is enabled. this current should be added to the base i pd current. 4: these currents are measured on the device c ontaining the most memory in this family.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 372 ? 2009-2012 microchip technology inc. table 27-8: dc characteristics: doze current (i doze ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typical ( 1 ) max doze ratio units conditions doze current (i doze ) ( 2 ) dc73a 45 60 1:2 ma -40c 3.3v 40 mips dc73f 40 60 1:64 ma dc73g 40 60 1:128 ma dc70a 43 60 1:2 ma +25c 3.3v 40 mips dc70f 38 60 1:64 ma dc70g 38 60 1:128 ma dc71a 42 60 1:2 ma +85c 3.3v 40 mips dc71f 37 60 1:64 ma dc71g 37 60 1:128 ma dc72a 41 60 1:2 ma +125c 3.3v 40 mips dc72f 36 60 1:64 ma dc72g 36 60 1:128 ma note 1: data in the typical column is at 3.3v, +25c unless otherwise stated. 2: i doze is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code exec ution pattern and temperatur e, also have an impact on the current consumption. t he test conditions for all i doze measurements are as follows: ? oscillator is configured in ec mode and external cl ock is active, osc1 is driven with external square wave from rail-to-rail (ec clock over shoot/undershoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? cpu, sram, program memory and data memory are operational ? no peripheral modules are operating; however, ever y peripheral is being clocked (all pmdx bits are all ? 0 ?s) ? cpu executing while(1) statement ? jtag disabled
? 2009-2012 microchip technology inc. ds70591e-page 373 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-9: dc characteristics: i/o pin input specifications dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions v il input low voltage di10 i/o pins v ss ?0.2v dd v di15 mclr v ss ?0.2v dd v di16 i/o pins with osc1 or sosci v ss ?0.2v dd v di18 i/o pins with sdax, sclx v ss ? 0.3 v dd v smbus disabled di19 i/o pins with sdax, sclx v ss ? 0.8 v smbus enabled v ih input high voltage di20 di21 i/o pins non 5v tolerant ( 4 ) i/o pins 5v tolerant ( 4 ) 0.7 v dd 0.7 v dd ? ? v dd 5.5 v v di28 di29 sdax, sclx sdax, sclx 0.7 v dd 2.1 ? ? 5.5 5.5 v v smbus disabled smbus enabled i cnpu cnx pull-up current di30 ? 250 ? ? av dd = 3.3v, v pin = v ss i il input leakage current ( 2 , 3 , 4 ) di50 i/o pins with: 4x driver pins: ra0-ra7, ra14, ra15, rb0-rb15, rc1-rc4, rc12-rc14, rd0-rd2, rd8-rd12, rd14, rd15, re8, re9, rf0-rf8, rf12, rf13, rg0-rg3, rg6-rg9, rg14, rg15 8x driver pins: rc15 16x driver pins: ra9, ra10, rd3-rd7, rd13, re0-re7, rg12, rg13 ? ? ? ? ? ? 2 4 8 ? a ? a ? a v ss ? v pin ? v dd , pin at high-impedance v ss ? v pin ? v dd , pin at high-impedance v ss ? v pin ? v dd , pin at high-impedance di55 mclr ??2 ? av ss ?? v pin ?? v dd di56 osc1 ? ? 2 ? av ss ?? v pin ?? v dd , xt and hs modes note 1: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 2: the leakage current on the mclr pin is strongly dependent on the app lied voltage level. the specified levels represent normal operating co nditions. higher leakage current may be measured at different input voltages. 3: negative current is defined as current sourced by the pin. 4: see ? pin diagrams ? for the list of 5v tolerant i/o pins. 5: v il source < (v ss ? 0.3). characterized but not tested. 6: non 5v tolerant pins v ih source > (v dd + 0.3), 5v tolerant pins v ih source > 5.5v. characterized but not tested. 7: digital 5v tolerant pins cannot tolerate any ?positiv e? input injection current from input sources > 5.5v. 8: injection currents > | 0 | can affect the adc results by approximately 4-6 counts. 9: any number and/or combination of i/o pins not excluded under i icl or i ich conditions are permitted, pro- vided the mathematical ?absolute instantaneous? sum of the input injection currents from all pins do not exceed the specified limit. characterized but not tested.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 374 ? 2009-2012 microchip technology inc. i icl input low injection current di60a 0 ? -5 ( 3 , 5 , 8 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap , sosci, sosco and rb11 i ich input high injection current di60b 0 ? +5 ( 6 , 7 , 8 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap , sosci, sosco, rb11, and digital 5v tolerant designated pins ( 3 ) ?? i ict total input injection current di60c (sum of all i/o and control pins) -20 ( 9 ) ?+20 ( 9 ) ma absolute instantaneous sum of all input injection currents from all i/o pins (| i icl + | i ich |) ? ?? i ict table 27-9: dc characteristics: i/o pin input specifications (continued) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions note 1: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 2: the leakage current on the mclr pin is strongly dependent on the applied voltage level. the specified levels represent normal operating conditions. higher le akage current may be measured at different input voltages. 3: negative current is defined as current sourced by the pin. 4: see ? pin diagrams ? for the list of 5v tolerant i/o pins. 5: v il source < (v ss ? 0.3). characterized but not tested. 6: non 5v tolerant pins v ih source > (v dd + 0.3), 5v tolerant pins v ih source > 5.5v. characterized but not tested. 7: digital 5v tolerant pins cannot tolerate any ?positiv e? input injection current from input sources > 5.5v. 8: injection currents > | 0 | can affect the adc results by approximately 4-6 counts. 9: any number and/or combination of i/o pins not excluded under i icl or i ich conditions are permitted, pro- vided the mathematical ?absolute instantaneous? sum of the input injection currents from all pins do not exceed the specified limit. characterized but not tested.
? 2009-2012 microchip technology inc. ds70591e-page 375 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-10: dc characteristics: i/o pin output specifications dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic min. typ. max. units conditions do10 v ol output low voltage i/o pins: 4x sink driver pins ? ra0-ra7, ra14, ra15, rb0-rb15, rc1-rc4, rc12-rc14, rd0-rd2, rd8-rd12, rd14, rd15, re8, re9, rf0-rf8, rf12, rf13, rg0-rg3, rg6-rg9, rg14, rg15 ??0.4vi ol ? 6 ma, v dd = 3.3v see note 1 output low voltage i/o pins: 8x sink driver pin ? rc15 ??0.4vi ol ? 10 ma, v dd = 3.3v see note 1 output low voltage i/o pins: 16x sink driver pins ? ra9, ra10, rd3-rd7, rd13, re0-re7, rg12, rg13 ??0.4vi ol ? 18 ma, v dd = 3.3v see note 1 do20 v oh output high voltage i/o pins: 4x sink driver pins ? ra0-ra7, ra14, ra15, rb0-rb15, rc1-rc4, rc12-rc14, rd0-rd2, rd8-rd12, rd14, rd15, re8, re9, rf0-rf8, rf12, rf13, rg0-rg3, rg6-rg9, rg14, rg15 2.4 ? ? v i oh ? -6 ma, v dd = 3.3v see note 1 output high voltage i/o pins: 8x sink driver pin ? rc15 2.4 ? ? v i oh ? -10 ma, v dd = 3.3v see note 1 output high voltage i/o pins: 16x sink driver pins ? ra9, ra10, rd3-rd7, rd13, re0-re7, rg12, rg13 2.4 ? ? v i oh ? -18 ma, v dd = 3.3v see note 1 note 1: parameters are characterized, but not tested.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 376 ? 2009-2012 microchip technology inc. do20a v oh 1 output high voltage i/o pins: 4x sink driver pins ? ra0-ra7, ra14, ra15, rb0-rb15, rc1-rc4, rc12-rc14, rd0-rd2, rd8-rd12, rd14, rd15, re8, re9, rf0-rf8, rf12, rf13, rg0-rg3, rg6-rg9, rg14, rg15 1.5 ? ? v i oh ? -12 ma, v dd = 3.3v see note 1 2.0 ? ? v i oh ? -11 ma, v dd = 3.3v see note 1 3.0 ? ? v i oh ? -3 ma, v dd = 3.3v see note 1 output high voltage i/o pins: 8x sink driver pin ? rc15 1.5 ? ? v i oh ? -16 ma, v dd = 3.3v see note 1 2.0 ? ? v i oh ? -12 ma, v dd = 3.3v see note 1 3.0 ? ? v i oh ? -4 ma, v dd = 3.3v see note 1 output high voltage i/o pins: 16x sink driver pins ? ra9, ra10, rd3-rd7, rd13, re0-re7, rg12, rg13 1.5 ? ? v i oh ? -30 ma, v dd = 3.3v see note 1 2.0 ? ? v i oh ? -25 ma, v dd = 3.3v see note 1 3.0 ? ? v i oh ? -8 ma, v dd = 3.3v see note 1 table 27-10: dc characteristics: i/o pin output specifications (continued) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic min. typ. max. units conditions note 1: parameters are characterized, but not tested. table 27-11: electrical characteristics: brown-out reset (bor) dc characteristics standard operating conditions: 3.0v to 3.6v ( 3 ) (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min ( 1 ) typ max units conditions bo10 v bor bor event on v dd transition high-to-low 2.6 ? 2.95 v see note 2 note 1: parameters are for design guidance only and are not tested in manufacturing. 2: the device will operate as normal until the v ddmin threshold is reached. 3: overall functional device operation at v bormin < v dd < v ddmin is tested but not characterized. all device analog modules, such as the adc, etc., will function but with degraded performance below v ddmin .
? 2009-2012 microchip technology inc. ds70591e-page 377 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-13: internal voltage regulator specifications table 27-12: dc characteristics: program memory dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions program flash memory d130 e p cell endurance 10,000 ? ? e/w -40 ? c to +125 ? c d131 v pr v dd for read v min ?3.6vv min = minimum operating voltage d132b v pew v dd for self-timed write v min ?3.6vv min = minimum operating voltage d134 t retd characteristic retention 20 ? ? year provided no other specifications are violated, -40 ? c to +125 ? c d135 i ddp supply current during programming ?10 ?ma d136a t rw row write time 1.43 ? 1.58 ms t rw = 11064 frc cycles, t a = +85c, see note 2 d136b t rw row write time 1.39 ? 1.63 ms t rw = 11064 frc cycles, t a = +125c, see note 2 d137a t pe page erase time 21.8 ? 24.1 ms t pe = 168517 frc cycles, t a = +85c, see note 2 d137b t pe page erase time 21.1 ? 24.8 ms t pe = 168517 frc cycles, t a = +125c, see note 2 d138a t ww word write cycle time 45.8 ? 50.7 s t ww = 355 frc cycles, t a = +85c, see note 2 d138b t ww word write cycle time 44.5 ? 52.3 s t ww = 355 frc cycles, t a = +125c, see note 2 note 1: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 2: other conditions: frc = 7.37 mhz, tun<5:0> = b'011111 (for min.), tun<5:0> = b'100000 (for max.). this parameter depends on the frc accuracy (see table 27-20 ) and the value of the frc oscillator tuning register (see register 9-4 ). for complete details on calcul ating the minimum and maximum time, see section 5.3 ?programming operations? . operating conditions: -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristics min typ max units comments ?c efc external filter capacitor value ( 1 ) 22 ? ? f capacitor must be low series resistance (< 0.5 ohms) note 1: typical v cap voltage = 2.5 volts when v dd ? v ddmin .
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 378 ? 2009-2012 microchip technology inc. 27.2 ac characteristics and timing parameters this section defines dspic33fj32g s406/606/608/610 and dspic33fj64gs406/ 606/608/610 ac characteristics and timing parameters. table 27-14: temperature and voltage specifications ? ac figure 27-1: load conditions for device timing specifications table 27-15: capacitive loading requirements on output pins ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended operating voltage v dd range as described in section 27.0 ?electrical characteristics? . param no. symbol characteristic min typ max units conditions do50 c osco osc2 pin ? ? 15 pf in xt and hs modes, when external clock is used to drive osc1 do56 c io all i/o pins and osc2 ? ? 50 pf ec mode do58 c b sclx, sdax ? ? 400 pf in i 2 c? mode v dd /2 c l r l pin pin v ss v ss c l r l =464 ? c l = 50 pf for all pins except osc2 15 pf for osc2 output load condition 1 ? for all pins except osc2 load condition 2 ? for osc2
? 2009-2012 microchip technology inc. ds70591e-page 379 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-2: external clock timing q1 q2 q3 q4 osc1 clko q1 q2 q3 q4 os20 os25 os30 os30 os40 os41 os31 os31 table 27-16: external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symb characteristic min typ ( 1 ) max units conditions os10 f in external clki frequency (external clo cks allowed only in ec and ecpll modes) dc ? 40 mhz ec oscillator crystal frequency 3.5 ? 10 ? ? ? 10 33 40 mhz khz mhz xt sosc hs os20 t osc t osc = 1/f osc 12.5 ? dc ns os25 t cy instruction cycle time ( 2 ) 25 ? dc ns os30 tosl, to s h external clock in (osc1) high or low time 0.375 x t osc ? 0.625 x t osc ns ec os31 tosr, to s f external clock in (osc1) rise or fall time ??20nsec os40 tckr clko rise time ( 3 ) ?5.2?ns os41 tckf clko fall time ( 3 ) ?5.2?ns os41 g m external oscillator transconductance 14 16 18 ma/v v dd = 3.3v, t a = +25oc note 1: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 2: instruction cycle period (t cy ) equals two times the input oscillator ti me base period. all specified values are based on characterization data for that particular oscillator type, u nder standard operating conditions, with the device executing code. exc eeding these specified limits may result in an unstable oscillator operation and/or higher than expected current consumption. all devices are tested to operate at ?min.? values with an external clock applied to the osc1/c lki pin. when an external clock input is used, the ?max.? cycle time limit is ?dc? (no clock) for all devices. 3: measurements are taken in ec mode. the clko signal is measured on the osc2 pin.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 380 ? 2009-2012 microchip technology inc. table 27-17: pll clock timing specifications (v dd = 3.0v to 3.6v) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions os50 f plli pll voltage controlled oscillator (vco) input frequency range 0.8 ? 8 mhz ecpll, xtpll modes os51 f sys on-chip vco system frequency 100 ? 200 mhz os52 t lock pll start-up time (lock time) 0.9 1.5 3.1 ms os53 d clk clko stability (jitter) ( 2 ) -3 0.5 3 % measured over 100 ms period note 1: data in ?typ? column is at 3.3v, +25c unless ot herwise stated. parameters are for design guidance only and are not tested in manufacturing. 2: these parameters are characterized by similarity, but ar e not tested in manufacturi ng. this specification is based on clock cycle by clock cycle measurements. to ca lculate the effective jitt er for individual time bases or communication clocks, use this formula: peripheral clock jitter d clk f osc peripheral bit rate clock -------------------------------------------------------------- ?? ?? ----------------------------------------------------------------------- - = for example: f osc = 32 mhz, d clk = 3%, spi bit rate clo ck, (i.e., sck) is 2 mhz. spi sck jitter d clk 32 mhz 2 mhz -------------------- ?? ?? ------------------------------ 3% 16 --------- - 3% 4 ------- - 0.75% ==== table 27-18: auxiliary pll clock timing specifications (v dd = 3.0v to 3.6v) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions os56 f hpout on-chip, 16x pll cco frequency 112 118 120 mhz os57 f hpin on-chip, 16x pll phase detector input frequency 7.0 7.37 7.5 mhz os58 t su frequency generator lock time ??10s note 1: data in ?typ? column is at 3.3v, +25c unless other wise stated. parameters are for design guidance only and are not tested in manufacturing.
? 2009-2012 microchip technology inc. ds70591e-page 381 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-19: ac characteristics: internal frc accuracy ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ?? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min typ max units conditions internal frc accuracy @ frc frequency = 7.37 mhz ( 1 ) f20a frc -1 ? +1 % -40c ? t a ?? +85c v dd = 3.0-3.6v f20b frc -2 ? +2 % -40c ? t a ?? +125c v dd = 3.0-3.6v note 1: frequency calibrated at +25c and 3.3v. the tun<5:0> bits can be used to compensate for temperature drift. table 27-20: ac characteristics: internal lprc accuracy ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min typ max units conditions lprc @ 32.768 khz ( 1 ) f21a lprc -40 ? +40 % -40c ? t a ?? +85c f21b lprc -70 ? +70 % -40c ? t a ?? +125c note 1: change of lprc frequency as v dd changes.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 382 ? 2009-2012 microchip technology inc. figure 27-3: i/o timing characteristics note: refer to figure 27-1 for load conditions. i/o pin (input) i/o pin (output) di35 old value new value di40 do31 do32 table 27-21: i/o timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions do31 t io r port output rise time 4x source driver pins ? ra0-ra7, ra14, ra15, rb0-rb15, rc1-rc4, rc12-rc14, rd0-rd2, rd8-rd12, rd14, rd15, re8, re9, rf0-rf8, rf12, rf13, rg0-rg3, rg6-rg9, rg14, rg15 ? 10 25 ns refer to figure 27-1 for test conditions 8x source driver pins ? rc15 ? 8 20 ns 16x source driver pins ? re0-re7, rg12, rg13 ? 6 15 ns do32 t io f port output fall time 4x source driver pins ? ra0-ra7, ra14, ra15, rb0-rb15, rc1-rc4, rc12-rc14, rd0-rd2, rd8-rd12, rd14, rd15, re8, re9, rf0-rf8, rf12, rf13, rg0-rg3, rg6-rg9, rg14, rg15 ? 10 25 ns refer to figure 27-1 for test conditions 8x source driver pins ? rc15 ? 8 20 ns 16x source driver pins ? re0-re7, rg12, rg13 ? 6 15 ns di35 t inp intx pin high or low time (input) 20 ? ? ns di40 t rbp cnx high or low time (input) 2 ? ? t cy note 1: data in ?typ? column is at 3.3v, +25c unless otherwise stated.
? 2009-2012 microchip technology inc. ds70591e-page 383 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-4: reset, watchdog timer, oscillator start-up timer and power-up timer timing characteristics v dd mclr internal por pwrt time-out osc time-out internal reset watchdog timer reset sy11 sy10 sy20 sy13 i/o pins sy13 note: refer to figure 27-1 for load conditions. fscm delay sy35 sy30 sy12
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 384 ? 2009-2012 microchip technology inc. table 27-22: reset, watchdog timer, osci llator start-up timer, power-up timer timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sy10 t mc lmclr pulse width (low) 2 ? ? ? s -40c to +85c sy11 t pwrt power-up timer period ? 2 4 8 16 32 64 128 ? ms -40c to +85c user programmable sy12 t por power-on reset delay 3 10 30 ? s -40c to +85c sy13 t ioz i/o high-impedance from mclr low or watchdog timer reset 0.68 0.72 1.2 ? s sy20 t wdt 1 watchdog timer time-out period ???mssee section 24.4 ?watchdog timer (wdt)? and lprc parameter f21a ( table 27-20 ). sy30 t ost oscillator start-up time ? 1024 t osc ??t osc = osc1 period note 1: these parameters are characterized but not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated.
? 2009-2012 microchip technology inc. ds70591e-page 385 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-5: timer1/2/3 external cl ock timing characteristics note: refer to figure 27-1 for load conditions. tx11 tx15 tx10 tx20 tmrx os60 txck table 27-23: timer1 external clock timing requirements ( 1 ) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating te mperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ max units conditions ta10 t tx h t1ck high time synchronous, no prescaler t cy + 20 ? ? ns must also meet parameter ta15, n = prescale value (1, 8, 64, 256) synchronous, with prescaler (t cy + 20)/n ? ? ns asynchronous 20 ? ? ns ta11 t tx l t1ck low time synchronous, no prescaler (t cy + 20) ? ? ns must also meet parameter ta15, n = prescale value (1, 8, 64, 256) synchronous, with prescaler (t cy + 20)/n ? ? ns asynchronous 20 ? ? ns ta15 t tx p t1ck input period synchronous, no prescaler 2 t cy + 40 ? ? ns synchronous, with prescaler greater of: 40 ns or (2 t cy + 40)/n ? ? ? n = prescale value (1, 8, 64, 256) asynchronous 40 ? ? ns os60 ft1 sosci/t1ck oscillator input frequency range (oscillator enabled by setting bit, tcs (t1con<1>)) dc ? 50 khz ta20 t ckextmrl delay from external t1ck clock edge to timer increment 0.75 t cy + 40 ? 1.75 t cy + 40 ? note 1: timer1 is a type a.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 386 ? 2009-2012 microchip technology inc. table 27-24: timer2/4 externa l clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ max units conditions tb10 ttxh txck high time synchronous mode greater of: 20 or (t cy + 20)/n ? ? ns must also meet parameter tb15, n = prescale value (1, 8, 64, 256) tb11 ttxl txck low time synchronous mode greater of: 20 or (t cy + 20)/n ? ? ns must also meet parameter tb15, n = prescale value (1, 8, 64, 256) tb15 ttxp txck input period synchronous mode greater of: 40 or (2 t cy + 40)/n ? ? ns n = prescale value (1, 8, 64, 256) tb20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 40 ? 1.75 t cy + 40 ns note 1: these parameters are characterized, but are not tested in manufacturing. table 27-25: timer3/5 externa l clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ max units conditions tc10 ttxh txck high time synchronous t cy + 20 ? ? ns must also meet parameter tc15 tc11 ttxl txck low time synchronous t cy + 20 ? ? ns must also meet parameter tc15 tc15 ttxp txck input period synchronous, with prescaler 2 t cy + 40 ? ? ns tc20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 40 ? 1.75 t cy + 40 ns note 1: these parameters are characterized, but are not tested in manufacturing.
? 2009-2012 microchip technology inc. ds70591e-page 387 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-6: input capture x (icx) timing characteristics figure 27-7: output compare x (ocx) modu le timing characteristics icx ic10 ic11 ic15 note: refer to figure 27-1 for load conditions. table 27-26: input capture x timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min max units conditions ic10 tccl icx input low time no prescaler 0.5 t cy + 20 ? ns with prescaler 10 ? ns ic11 tcch icx input high time no prescaler 0.5 t cy + 20 ? ns with prescaler 10 ? ns ic15 tccp icx input period (t cy + 40)/n ? ns n = prescale value (1, 4, 16) note 1: these parameters are characterized but not tested in manufacturing. ocx oc11 oc10 (output compare note: refer to figure 27-1 for load conditions. or pwm mode) table 27-27: output compare x module timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ max units conditions oc10 tccf ocx output fall time ? ? ? ns see parameter do32 oc11 tccr ocx output rise time ? ? ? ns see parameter do31 note 1: these parameters are characterized but not tested in manufacturing.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 388 ? 2009-2012 microchip technology inc. figure 27-8: output compare x/pwmx module timing characteristics ocfa ocx oc20 oc15 active tri-state table 27-28: simple ocx/pwmx mode timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ max units conditions oc15 t fd fault input to pwm i/o change ??t cy + 20 ns oc20 t flt fault input pulse width t cy + 20 ? ? ns note 1: these parameters are characterized but not tested in manufacturing.
? 2009-2012 microchip technology inc. ds70591e-page 389 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-9: high-speed pwmx module fault timing characteristics figure 27-10: high-speed pwmx modu le timing characteristics flt x pwmx mp20 mp30 pwmx mp11 mp10 note: refer to figure 27-1 for load conditions. table 27-29: high-speed pwmx module timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ max units conditions mp10 t fpwm pwmx output fall time ? 2.5 ? ns mp11 t rpwm pwmx output rise time ? 2.5 ? ns mp20 t fd fault input ? to pwmx i/o change ? ? 15 ns dtc<10> = 10 mp30 t fh minimum pwmx fault pulse width 8??ns mp31 t pdly tap delay 1.04 ? ? ns a clk = 120 mhz mp32 a clk pwmx input clock ? ? 120 mhz see note 2 note 1: these parameters are characterized but not tested in manufacturing. 2: this parameter is a maximum allowed input clock for the pwm module.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 390 ? 2009-2012 microchip technology inc. table 27-30: spix maximum data/clock rate summary figure 27-11: spix master mode (h alf-duplex, transmit only, cke = 0 ) timing characteristics figure 27-12: spix master mode (h alf-duplex, transmit only, cke = 1 ) timing characteristics ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended maximum data rate master transmit only (half-duplex) master transmit/receive (full-duplex) slave transmit/receive (full-duplex) cke ckp smp 15 mhz table 27-31 ?? 0 , 10 , 10 , 1 10 mhz ? table 27-32 ? 10 , 11 10 mhz ? table 27-33 ? 00 , 11 15 mhz ? ? table 27-34 100 11 mhz ? ? table 27-35 110 15 mhz ? ? table 27-36 010 11 mhz ? ? table 27-37 000 sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sp10 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 27-1 for load conditions. sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sp10 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 27-1 for load conditions. sp36
? 2009-2012 microchip technology inc. ds70591e-page 391 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-31: spix master mode (half-duplex, transmit only) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sp10 tscp maximum sckx frequency ? ? 15 mhz see note 3 sp20 tscf sckx output fall time ? ? ? ns see parameter do32 and note 4 sp21 tscr sckx output rise time ? ? ? ns see parameter do31 and note 4 sp30 tdof sdox data output fall time ? ? ? ns see parameter do32 and note 4 sp31 tdor sdox data output rise time ? ? ? ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge ?620ns sp36 tdiv2sch, tdiv2scl sdox data output setup to first sckx edge 30 ? ? ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 66.7 ns. theref ore, the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spix pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 392 ? 2009-2012 microchip technology inc. figure 27-13: spix master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing characteristics table 27-32: spix master mo de (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sp10 tscp maximum sckx frequency ? ? 10 mhz see note 3 sp20 tscf sckx output fall time ? ? ? ns see parameter do32 and note 4 sp21 tscr sckx output rise time ? ? ? ns see parameter do31 and note 4 sp30 tdof sdox data output fall time ? ? ? ns see parameter do32 and note 4 sp31 tdor sdox data output rise time ? ? ? ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge ? 6 20 ns sp36 tdov2sc, tdov2scl sdox data output setup to first sckx edge 30 ? ? ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ? ? ns sp41 tsch2dil, tscl2dil hold time of sdix data input to sckx edge 30 ? ? ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 100 ns. the cl ock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spix pins. sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sp10 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 27-1 for load conditions. sp36 sp41 msb in lsb in bit 14 - - - -1 sdix sp40
? 2009-2012 microchip technology inc. ds70591e-page 393 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-14: spix master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing characteristics table 27-33: spix master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sp10 tscp maximum sckx frequency ? ? 10 mhz -40oc to +125oc and see note 3 sp20 tscf sckx output fall time ? ? ? ns see parameter do32 and note 4 sp21 tscr sckx output rise time ? ? ? ns see parameter do31 and note 4 sp30 tdof sdox data output fall time ? ? ? ns see parameter do32 and note 4 sp31 tdor sdox data output rise time ? ? ? ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge ? 6 20 ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ? ? ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ? ? ns sp41 tsch2dil, tscl2dil hold time of sdix data input to sckx edge 30 ? ? ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 100 ns. the cl ock generated in master mo de must not violate this specification. 4: assumes 50 pf load on all spix pins. sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sdix sp10 sp40 sp41 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 msb in lsb in bit 14 - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 27-1 for load conditions.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 394 ? 2009-2012 microchip technology inc. figure 27-15: spix slave mode (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing characteristics ssx sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sdi sp50 sp60 sdix sp30,sp31 msb bit 14 - - - - - -1 lsb sp51 msb in bit 14 - - - -1 lsb in sp35 sp52 sp73 sp72 sp72 sp73 sp70 sp40 sp41 note: refer to figure 27-1 for load conditions.
? 2009-2012 microchip technology inc. ds70591e-page 395 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-34: spix slave mo de (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sp70 tscp maximum sckx input frequency ? ? 15 mhz see note 3 sp72 tscf sckx input fall time ? ? ? ns see parameter do32 and note 4 sp73 tscr sckx input rise time ? ? ? ns see parameter do31 and note 4 sp30 tdof sdox data output fall time ? ? ? ns see parameter do32 and note 4 sp31 tdor sdox data output rise time ? ? ? ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge ?620ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ? ? ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ? ? ns sp41 tsch2dil, tscl2dil hold time of sdix data input to sckx edge 30 ? ? ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx input 120 ? ? ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 ? 50 ns see note 4 sp52 tsch2ssh tscl2ssh ssx after sckx edge 1.5 t cy + 40 ? ? ns see note 4 sp60 tssl2dov sdox data output valid after ssx edge ??50ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 66.7 ns. therefor e, the sckx clock, generated by the master, must not violate this specification. 4: assumes 50 pf load on all spix pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 396 ? 2009-2012 microchip technology inc. figure 27-16: spix slave mode (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing characteristics ssx sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sdi sp50 sp60 sdix sp30,sp31 msb bit 14 - - - - - -1 lsb sp51 msb in bit 14 - - - -1 lsb in sp35 sp52 sp52 sp73 sp72 sp72 sp73 sp70 sp40 sp41 note: refer to figure 27-1 for load conditions.
? 2009-2012 microchip technology inc. ds70591e-page 397 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-35: spix slave mo de (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sp70 tscp maximum sckx input frequency ? ? 11 mhz see note 3 sp72 tscf sckx input fall time ? ? ? ns see parameter do32 and note 4 sp73 tscr sckx input rise time ? ? ? ns see parameter do31 and note 4 sp30 tdof sdox data output fall time ? ? ? ns see parameter do32 and note 4 sp31 tdor sdox data output rise time ? ? ? ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge ?620ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ? ? ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ? ? ns sp41 tsch2dil, tscl2dil hold time of sdix data input to sckx edge 30 ? ? ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx input 120 ? ? ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 ? 50 ns see note 4 sp52 tsch2ssh tscl2ssh ssx after sckx edge 1.5 t cy + 40 ? ? ns see note 4 sp60 tssl2dov sdox data output valid after ssx edge ??50ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 91 ns. therefor e, the sckx clock, generated by the master, must not violate this specification. 4: assumes 50 pf load on all spix pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 398 ? 2009-2012 microchip technology inc. figure 27-17: spix slave mode (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing characteristics ss x sck x (ckp = 0 ) sck x (ckp = 1 ) sdo x sp50 sp40 sp41 sp30,sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 msb in bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 sp70 note: refer to figure 27-1 for load conditions. sdi x
? 2009-2012 microchip technology inc. ds70591e-page 399 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-36: spix slave mo de (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sp70 tscp maximum sckx input frequency ? ? 15 mhz see note 3 sp72 tscf sckx input fall time ? ? ? ns see parameter do32 and note 4 sp73 tscr sckx input rise time ? ? ? ns see parameter do31 and note 4 sp30 tdof sdox data output fall time ? ? ? ns see parameter do32 and note 4 sp31 tdor sdox data output rise time ? ? ? ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge ?620ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ? ? ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ? ? ns sp41 tsch2dil, tscl2dil hold time of sdix data input to sckx edge 30 ? ? ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx input 120 ? ? ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 ? 50 ns see note 4 sp52 tsch2ssh tscl2ssh ssx after sckx edge 1.5 t cy + 40 ? ? ns see note 4 note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 66.7 ns. therefor e, the sckx clock, generated by the master, must not violate this specification. 4: assumes 50 pf load on all spix pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 400 ? 2009-2012 microchip technology inc. figure 27-18: spix slave mode (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing characteristics ss x sck x (ckp = 0 ) sck x (ckp = 1 ) sdo x sp50 sp40 sp41 sp30,sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 msb in bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 sp70 note: refer to figure 27-1 for load conditions. sdi x
? 2009-2012 microchip technology inc. ds70591e-page 401 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-37: spix slave mo de (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ ( 2 ) max units conditions sp70 tscp maximum sckx input frequency ? ? 11 mhz see note 3 sp72 tscf sckx input fall time ? ? ? ns see parameter do32 and note 4 sp73 tscr sckx input rise time ? ? ? ns see parameter do31 and note 4 sp30 tdof sdox data output fall time ? ? ? ns see parameter do32 and note 4 sp31 tdor sdox data output rise time ? ? ? ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge ?620ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ? ? ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ? ? ns sp41 tsch2dil, tscl2dil hold time of sdix data input to sckx edge 30 ? ? ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx input 120 ? ? ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 ? 50 ns see note 4 sp52 tsch2ssh tscl2ssh ssx after sckx edge 1.5 t cy + 40 ? ? ns see note 4 note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 91 ns. therefor e, the sckx clock, generated by the master, must not violate this specification. 4: assumes 50 pf load on all spix pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 402 ? 2009-2012 microchip technology inc. figure 27-19: i2cx bus start/stop bits timing characteristics (master mode) figure 27-20: i2cx bus data timing characteristics (master mode) im31 im34 sclx sdax start condition stop condition im30 im33 note: refer to figure 27-1 for load conditions. im11 im10 im33 im11 im10 im20 im26 im25 im40 im40 im45 im21 sclx sdax in sdax out note: refer to figure 27-1 for load conditions.
? 2009-2012 microchip technology inc. ds70591e-page 403 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-38: i2cx bus data timing requirements (master mode) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min ( 1 ) max units conditions im10 t lo : scl clock low time 100 khz mode t cy /2 (brg + 1) ? ? s 400 khz mode t cy /2 (brg + 1) ? ? s 1 mhz mode ( 2 ) t cy /2 (brg + 1) ? ? s im11 t hi : scl clock high time 100 khz mode t cy /2 (brg + 1) ? ? s 400 khz mode t cy /2 (brg + 1) ? ? s 1 mhz mode ( 2 ) t cy /2 (brg + 1) ? ? s im20 t f : scl sdax and sclx fall time 100 khz mode ? 300 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 2 ) ? 100 ns im21 t r : scl sdax and sclx rise time 100 khz mode ? 1000 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 2 ) ? 300 ns im25 t su : dat data input setup time 100 khz mode 250 ? ns 400 khz mode 100 ? ns 1 mhz mode ( 2 ) 40 ? ns im26 t hd : dat data input hold time 100 khz mode 0 ? ? s 400 khz mode 0 0.9 ? s 1 mhz mode ( 2 ) 0.2 ? ? s im30 t su : sta start condition setup time 100 khz mode t cy /2 (brg + 1) ? ? s only relevant for repeated start condition 400 khz mode t cy /2 (brg + 1) ? ? s 1 mhz mode ( 2 ) t cy /2 (brg + 1) ? ? s im31 t hd : sta start condition hold time 100 khz mode t cy /2 (brg + 1) ? ? s after this period, the first clock pulse is generated 400 khz mode t cy /2 (brg + 1) ? ? s 1 mhz mode ( 2 ) t cy /2 (brg + 1) ? ? s im33 t su : sto stop condition setup time 100 khz mode t cy /2 (brg + 1) ? ? s 400 khz mode t cy /2 (brg + 1) ? ? s 1 mhz mode ( 2 ) t cy /2 (brg + 1) ? ? s im34 t hd : sto stop condition hold time 100 khz mode t cy /2 (brg + 1) ? ns 400 khz mode t cy /2 (brg + 1) ? ns 1 mhz mode ( 2 ) t cy /2 (brg + 1) ? ns im40 t aa : scl output valid from clock 100 khz mode ? 3500 ns 400 khz mode ? 1000 ns 1 mhz mode ( 2 ) ? 400 ns im45 t bf : sda bus free time 100 khz mode 4.7 ? ? s time the bus must be free before a new transmission can start 400 khz mode 1.3 ? ? s 1 mhz mode ( 2 ) 0.5 ? ? s im50 c b bus capacitive loading ? 400 pf im51 t pgd pulse gobbler delay 65 390 ns see note 3 note 1: brg is the value of the i 2 c? baud rate generator. refer to section 19. ?inter-integrated circuit (i 2 c?)? (ds70195) in the ? dspic33f/pic24h family reference manual? . 2: maximum pin capacitance = 10 pf for all i2cx pins (for 1 mhz mode only). 3: typical value for this parameter is 130 ns.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 404 ? 2009-2012 microchip technology inc. figure 27-21: i2cx bus start/stop bits timing characteristics (slave mode) figure 27-22: i2cx bus data timing characteristics (slave mode) is34 sclx sdax start condition stop condition is33 is31 is30 is30 is31 is33 is11 is10 is20 is26 is25 is40 is40 is45 is21 sclx sdax in sdax out
? 2009-2012 microchip technology inc. ds70591e-page 405 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 27-39: i2cx bus data timing requirements (slave mode) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic min max units conditions is10 t lo : scl clock low time 100 khz mode 4.7 ? ? s device must operate at a minimum of 1.5 mhz 400 khz mode 1.3 ? ? s device must operate at a minimum of 10 mhz 1 mhz mode ( 1 ) 0.5 ? ? s is11 t hi : scl clock high time 100 khz mode 4.0 ? ? s device must operate at a minimum of 1.5 mhz 400 khz mode 0.6 ? ? s device must operate at a minimum of 10 mhz 1 mhz mode ( 1 ) 0.5 ? ? s is20 t f : scl sdax and sclx fall time 100 khz mode ? 300 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 1 ) ? 100 ns is21 t r : scl sdax and sclx rise time 100 khz mode ? 1000 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 1 ) ? 300 ns is25 t su : dat data input setup time 100 khz mode 250 ? ns 400 khz mode 100 ? ns 1 mhz mode ( 1 ) 100 ? ns is26 t hd : dat data input hold time 100 khz mode 0 ? ? s 400 khz mode 0 0.9 ? s 1 mhz mode ( 1 ) 00.3 ? s is30 t su : sta start condition setup time 100 khz mode 4.7 ? ? s only relevant for repeated start condition 400 khz mode 0.6 ? ? s 1 mhz mode ( 1 ) 0.25 ? ? s is31 t hd : sta start condition hold time 100 khz mode 4.0 ? ? s after this period, the first clock pulse is generated 400 khz mode 0.6 ? ? s 1 mhz mode ( 1 ) 0.25 ? ? s is33 t su : sto stop condition setup time 100 khz mode 4.7 ? ? s 400 khz mode 0.6 ? ? s 1 mhz mode ( 1 ) 0.6 ? ? s is34 t hd : sto stop condition hold time 100 khz mode 4000 ? ns 400 khz mode 600 ? ns 1 mhz mode ( 1 ) 250 ns is40 t aa : scl output valid from clock 100 khz mode 0 3500 ns 400 khz mode 0 1000 ns 1 mhz mode ( 1 ) 0 350 ns is45 t bf : sda bus free time 100 khz mode 4.7 ? ? s time the bus must be free before a new transmission can start 400 khz mode 1.3 ? ? s 1 mhz mode ( 1 ) 0.5 ? ? s is50 c b bus capacitive loading ? 400 pf note 1: maximum pin capacitance = 10 pf for all i2cx pins (for 1 mhz mode only).
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 406 ? 2009-2012 microchip technology inc. table 27-40: 10-bit, high-speed adc module specifications ac characteristics standard operating conditions: 3.0v and 3.6v ( 2 ) (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40 c ? t a ? +125c for extended param no. symbol characteristic min typ max units conditions device supply ad01 av dd module v dd supply greater of v dd ? 0.3 or 3.0 ?lesser of v dd + 0.3 or 3.6 v ad02 av ss module v ss supply vss ? 0.3 ? v ss + 0.3 v analog input ad10 v inh -v inl full-scale input span v ss ?v dd v ad11 v in absolute input voltage av ss ?av dd v ad12 i ad operating current ? 8 ? ma ad13 ? leakage current ? 0.6 ? ? av inl = av ss = 0v, av dd = 3.3v source impedance = 100 ? ad17 r in recommended impedance of analog voltage source ??100 ? dc accuracy ad20 nr resolution 10 data bits bits ad21a inl integral nonlinearity > -2 0.5 < 2 lsb v inl = av ss = 0v, av dd = 3.3v ad22a dnl differential nonlinearity > -1 0.5 < 1 lsb v inl = av ss = 0v, av dd = 3.3v ad23a g err gain error > -5 2.0 < 5 lsb v inl = av ss = 0v, av dd = 3.3v ad24a e off offset error > -3 0.75 < 3 lsb v inl = av ss = v ss = 0v, av dd = v dd = 3.3v ad25 ? monotonicity ( 1 ) ? ? ? ? guaranteed dynamic performance ad30 thd total harmonic distortion ? -73 ? db ad31 sinad signal to noise and distortion ?58 ?db ad32 sfdr spurious free dynamic range ?-73 ?db ad33 f nyq input signal bandwidth ? ? 1 mhz ad34 enob effective number of bits ? 9.4 ? bits note 1: the analog-to-digital conversion result never decreas es with an increase in the input voltage and has no missing codes. 2: overall functional device operation at v bor < v dd < v ddmin is ensured but not characterized. all device analog modules, such as the adc, etc., will fu nction but with degraded performance below v ddmin .
? 2009-2012 microchip technology inc. ds70591e-page 407 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-23: analog-to-digital conversion timing per input table 27-41: 10-bit, high-speed a dc module timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v ( 2 ) (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40 c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions clock parameters ad50b t ad adc clock period 35.8 ? ? ns conversion rate ad55b t conv conversion time ? 14 t ad ?? ad56b f cnv throughput rate devices with single sar ? ? 2.0 msps devices with dual sars ? ? 4.0 msps timing parameters ad63b t dpu time to stabilize analog stage from adc off to adc on ( 1 ) 1.0 ? 10 ? s note 1: these parameters are characterized but not tested in manufacturing. 2: overall functional device operation at v bor < v dd < v ddmin is guaranteed but not characterized. all device analog modules such as the adc, etc., will function but with degr aded performance below v ddmin . t ad adc data adbufx 98 210 old data new data conv adc clock trigger pulse tconv
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 408 ? 2009-2012 microchip technology inc. table 27-42: comparator module specifications ac and dc characteristics standard operating conditions (unless otherwise stated) operating temperature: -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. no. symbol characteristic min typ max units comments cm10 v ioff input offset voltage 5 15 mv cm11 v icm input common-mode voltage range ( 1 ) 0?av dd ? 1.5 v cm12 v gain open-loop gain ( 1 ) 90??db cm13 cmrr common-mode rejection ratio ( 1 ) 70??db cm14 t resp large signal response 20 30 ns v+ input step of 100 mv while v- input held at av dd /2. delay measured from analog input pin to pwm output pin. note 1: parameters are for design guidance only and are not tested in manufacturing. table 27-43: dac module specifications ac and dc characteristics standard operating conditions (unless otherwise stated) operating temperature: -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param . no. symbol characteristic min typ max units comments da01 extref external reference voltage ( 1 ) 0?av dd ? 1.6 v da08 intref internal reference voltage ( 1 ) 1.25 1.32 1.41 v da02 cv res resolution 10 data bits bits da03 inl integral nonlinearity error ? 1.0 ? ? av dd = 3.3v, dac ref = (av dd /2)v da04 dnl differential nonlinearity error ? 0.8 ? lsb da05 eoff offset error ? 2.0 ? lsb da06 eg gain error ? 2.0 ? lsb da07 t set settling time ( 1 ) ? ? 650 nsec measured when range = 1 (high range) and cmref<9:0> transitions from 0x1ff to 0x300. note 1: parameters are for design guidance only and are not tested in manufacturing.
? 2009-2012 microchip technology inc. ds70591e-page 409 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-24: qea/qeb input characteristics table 27-44: dac output buffer specifications dc characteristics standard operating conditions (unless otherwise stated) operating temper ature: -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. no. symbol characteristic min typ max units comments da10 r load resistive output load impedance 3k ? ? ? da11 c load output load capacitance ?2035pf da12 i out output current drive strength 200 300 400 ? a sink and source da13 v range full output drive strength voltage range a vss + 250 mv ? av dd ? 900 mv v da14 v lrange output drive voltage range at reduced current drive of 50 ? a av ss + 50 mv ? av dd ? 500 mv v da15 i dd current consumed when module is enabled, high-power mode ? ? 1.3 x i out ? a module will always consume this current even if no load is connected to the output da16 r outon output impedance when module is enabled ?500? ? tq30 tq35 tq31 qea (input) tq30 tq35 tq31 qeb (input) tq36 qeb internal tq40 tq41
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 410 ? 2009-2012 microchip technology inc. figure 27-25: qei module index pulse timing characteristics table 27-45: quadrature decoder timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) typ ( 2 ) max units conditions tq30 t qu l quadrature input low time 6 t cy ?ns tq31 t qu h quadrature input high time 6 t cy ?ns tq35 t qu in quadrature input period 12 t cy ?ns tq36 t qu p quadrature phase period 3 t cy ?ns tq40 t quf l filter time to recognize low, with digital filter 3 * n * t cy ? ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 3 ) tq41 t quf h filter time to recognize high, with digital filter 3 * n * t cy ? ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 3 ) note 1: these parameters are characterized but not tested in manufacturing. 2: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 3: n = index channel digital filter clock divide select bits. refer to section 15. ?quadrature encoder interface (qei)? (ds70208) in the ? dspic33f/pic24h family reference manual ?. qea (input) ungated index qeb (input) tq55 index internal position counter reset tq50 tq51
? 2009-2012 microchip technology inc. ds70591e-page 411 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 figure 27-26: timerq (qei module) external clock timing characteristics table 27-46: qei index pulse timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min max units conditions tq50 tqil filter time to recognize low, with digital filter 3 * n * t cy ? ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 2 ) tq51 tqih filter time to recognize high, with digital filter 3 * n * t cy ? ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 2 ) tq55 tqidxr index pulse recognized to position counter reset (ungated index) 3 t cy ?ns ? note 1: these parameters are characterized but not tested in manufacturing. 2: alignment of index pulses to qea and qeb is shown for position counter reset timing only. shown for forward direction only (qea leads qeb). same timing applies for reverse direction (qea lags qeb) but index pulse recognition occurs on the falling edge. tq11 tq15 tq10 tq20 qeb poscnt table 27-47: qei module external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ max units conditions tq10 ttqh tqck high time synchronous, with prescaler t cy + 20 ? ? ns must also meet parameter tq15 tq11 ttql tqck low time synchronous, with prescaler t cy + 20 ? ? ns must also meet parameter tq15 tq15 ttqp tqcp input period synchronous, with prescaler 2 * t cy + 40 ? ? ns tq20 t ckextmrl delay from external txck clock edge to timer increment 0.5 t cy ? 1.5 t cy ? note 1: these parameters are characterized but not tested in manufacturing.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 412 ? 2009-2012 microchip technology inc. figure 27-27: ecan? module i/o timing characteristics table 27-49: dma read/write timing requirements cxtx pin (output) ca10 old value new value ca20 cxrx pin (input) ca11 table 27-48: ecan? module i/o timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min typ max units conditions ca10 tiof port output fall time ? ? ? ns see parameter do32 ca11 tior port output rise time ? ? ? ns see parameter do31 ca20 tcwf pulse width to trigger can wake-up filter 120 ? ? ns note 1: these parameters are characterized but not tested in manufacturing. ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min. typ max. units conditions dm1 dma read/write cycle time ? ? 1 t cy ns
? 2009-2012 microchip technology inc. ds70591e-page 413 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 28.0 50 mips electrical characteristics this section provides an overview of dspic33f j32gs406/606/608/610 and ds pic33fj64gs406/606/608/610 electrical characteristics for devices operating at 50 mips. specifications are identi cal to those shown in section 27.0 ?electrical characteristics? , with the exception of the parameters listed in this section. absolute maximum ratings for the dspic33fj32gs406 /606/608/610 and dspic33fj6 4gs406/606/608/610 50 mips devices are listed below. exposure to these maximum rating conditions for extended periods can affect device reliability. functional operation of the device at th ese or any other conditi ons above the parameters indicated in the operation listings of this specification is not implied. absolute maximum ratings ( 1 ) ambient temperature under bias................................................................................................. ............. .-40c to +85c storage temperature ............................................................................................................ .................. -65c to +150c voltage on v dd with respect to v ss ......................................................................................................... -0.3v to +4.0v voltage on any pin that is not 5v tolerant, with respect to v ss ( 2 ) ................................................... -0.3v to (v dd + 0.3v) voltage on any 5v tolerant pin with respect to v ss , when v dd ? 3.0v ( 2 ) ................................................. -0.3v to +5.6v voltage on any 5v tolerant pin with respect to v ss , when v dd < 3.0v ( 2 ) ........................................ -0.3v to (v dd + 0.3v) maximum current out of v ss pin ........................................................................................................................... 300 ma maximum current into v dd pin ( 2 ) ...........................................................................................................................250 ma maximum current sourced/sunk by any 4x i/o pin ..... ............................................................................ .................15 ma maximum current sourced/sunk by any 8x i/o pin ..... ............................................................................ .................25 ma maximum current sourced/sunk by any 16x i/o pin ...... .......................................................................... ................45 ma maximum current sunk by all ports ......................... ..................................................................... .........................200 ma maximum current sourced by all ports ( 2 ) ...............................................................................................................200 ma note 1: stresses above those listed under ?absolute maximu m ratings? may cause permanent damage to the device. this is a stress rating only, and functional o peration of the device at th ose or any other conditions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. 2: see the ? pin diagrams ? section for 5v tolerant pins.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 414 ? 2009-2012 microchip technology inc. 28.1 dc characteristics table 28-1: operating mips vs. voltage characteristic v dd range (in volts) temp range (in c) max mips dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 ? 3.0-3.6v ( 1 ) -40c to +85c 50 note 1: overall functional device operation at v bormin < v dd < v ddmin is tested but not characterized. all device analog modules, such as the adc, etc., will function but with degraded performance below v ddmin . see parameter bo10 in table 27-11 for the bor values. table 28-2: dc characteristics: operating current (i dd ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial parameter no. typical max units conditions operating current (i dd ) ( 1 ) mdc29d 85 100 ma -40c 3.3v 50 mips mdc29a 85 100 ma +25c mdc29b 85 100 ma +85c note 1: i dd is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code exec ution pattern and temperatur e, also have an impact on the current consumption. t he test conditions for all i dd measurements are as follows: ? oscillator is configured in ec mode with pll, os c1 is driven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? cpu, sram, program memory and data memory are operational ? no peripheral modules are operating; however, ever y peripheral is being clocked (all pmdx bits are zeroed) ? cpu executing while(1) statement ? jtag is disabled
? 2009-2012 microchip technology inc. ds70591e-page 415 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 28-3: dc characteristics: idle current (i idle ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial parameter no. typical max units conditions idle current (i idle ): core off clock on base current ( 1 ) mdc45d 40 50 ma -40c 3.3v 50 mips mdc45a 40 50 ma +25c mdc45b 40 50 ma +85c note 1: base idle current (i idle ) is measured as follows: ? cpu core is off, oscillator is configured in ec mode and external clock is active, osc1 is driven with external square wave from rail-to-rail (ec clock overshoot/ undershoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? no peripheral modules are operating; however, ev ery peripheral is being clocked (all pmdx bits are ? 0 ?s) ? jtag is disabled
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 416 ? 2009-2012 microchip technology inc. table 28-4: dc characteristics: doze current (i doze ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial parameter no. typical max doze ratio units conditions doze current (i doze ) ( 1 ) mdc74a 49 70 1:2 ma -40c 3.3v 50 mips mdc74f 43 70 1:64 ma mdc74g 43 70 1:128 ma mdc75a 47 70 1:2 ma +25c 3.3v 50 mips mdc75f 41 70 1:64 ma mdc75g 41 70 1:128 ma mdc76a 46 70 1:2 ma +85c 3.3v 50 mips mdc76f 40 70 1:64 ma mdc76g 40 70 1:128 ma note 1: i doze is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code exec ution pattern and temperatur e, also have an impact on the current consumption. t he test conditions for all i doze measurements are as follows: ? oscillator is configured in ec mode and external cl ock is active, osc1 is driven with external square wave from rail-to-rail (ec clock over shoot/undershoot < 250 mv required) ? clko is configured as an i/o input pin in the configuration word ? all i/o pins are configured as inputs and pulled to v ss ?mclr = v dd , wdt and fscm are disabled ? cpu, sram, program memory and data memory are operational ? no peripheral modules are operating; however, ev ery peripheral is being clocked (all pmdx bits are ? 0 ?s) ? cpu executing while(1) statement ? jtag is disabled
? 2009-2012 microchip technology inc. ds70591e-page 417 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 28.2 ac characteristics and timing parameters this section defines the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/ 610 ac characteristics and timing parameters for 50 mips devices. table 28-5: external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial param no. symb characteristic min typ ( 1 ) max units conditions mos10 f in external clki frequency (external clocks allowed only in ec and ecpll modes) dc ? 50 mhz ec oscillator crystal frequency 3.5 ? 10 ? ? ? 10 33 50 mhz khz mhz xt sosc hs mos20 t osc t osc = 1/f osc 10 ? dc ns mos25 t cy instruction cycle time ( 2 ) 20 ? dc ns mos30 tosl, to s h external clock in (osc1) high or low time 0.375 x t osc ? 0.625 x t osc ns ec mos31 tosr, to s f external clock in (osc1) rise or fall time ??20nsec mos40 tckr clko rise time ( 3 ) ?5.2?ns mos41 tckf clko fall time ( 3 ) ?5.2?ns mos41 g m external oscillator transconductance 14 16 18 ma/v v dd = 3.3v, t a = +25oc note 1: data in ?typ? column is at 3.3v, +25c unless otherwise stated. 2: instruction cycle period (t cy ) equals two times the input oscillator ti me base period. all specified values are based on characterization data fo r that particular oscillator type under standard operating conditions with the device executing code. exc eeding these specified limits may result in an unstable oscillator operation and/or higher than expected current consumption. all devices are tested to operate at ?min.? values with an external clock applied to the osc1/c lki pin. when an external clock input is used, the ?max.? cycle time limit is ?dc? (no clock) for all devices. 3: measurements are taken in ec mode. the clko signal is measured on the osc2 pin.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 418 ? 2009-2012 microchip technology inc. table 28-6: timer1 external clock timing requirements ( 1 ) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial param no. symbol characteristic min typ max units conditions mta10 t tx h t1ck high time synchronous, no prescaler t cy + 15 ? ? ns must also meet parameter ta15 , n = prescale value (1, 8, 64, 256) synchronous, with prescaler (t cy + 15)/n ? ? ns asynchronous 15 ? ? ns mta11 t tx l t1ck low time synchronous, no prescaler (t cy + 15) ? ? ns must also meet parameter ta15 , n = prescale value (1, 8, 64, 256) synchronous, with prescaler (t cy + 20)/n ? ? ns asynchronous 15 ? ? ns mta15 t tx p t1ck input period synchronous, no prescaler 2 t cy + 30 ? ? ns synchronous, with prescaler greater of: 40 ns or (2 t cy + 30)/n ? ? ? n = prescale value (1, 8, 64, 256) asynchronous 30 ? ? ns mos60 ft1 sosci/t1ck oscillator input frequency range (oscillator is enabled by setting bit, tcs (t1con<1>)) dc ? 50 khz mta20 t ckextmrl delay from external t1ck clock edge to timer increment 0.75 t cy + 30 ? 1.75 t cy + 30 ? note 1: timer1 is a type a.
? 2009-2012 microchip technology inc. ds70591e-page 419 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 table 28-7: timer2/4 external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial param no. symbol characteristic ( 1 ) min typ max units conditions mtb10 ttxh txck high time synchronous mode greater of: 15 or (t cy + 15)/n ? ? ns must also meet parameter tb15 , n = prescale value (1, 8, 64, 256) mtb11 ttxl txck low time synchronous mode greater of: 15 or (t cy + 15)/n ? ? ns must also meet parameter tb15 , n = prescale value (1, 8, 64, 256) mtb15 ttxp txck input period synchronous mode greater of: 40 or (2 t cy + 30)/n ? ? ns n = prescale value(1, 8, 64, 256) mtb20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 30 ? 1.75 t cy + 30 ns note 1: these parameters are characterized, but are not tested in manufacturing. table 28-8: timer3/5 external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial param no. symbol characteristic ( 1 ) min typ max units conditions mtc10 ttxh txck high time synchronous t cy + 10 ? ? ns must also meet parameter tc15 mtc11 ttxl txck low time synchronous t cy + 10 ? ? ns must also meet parameter tc15 mtc15 ttxp txck input period synchronous, with prescaler 2 t cy + 20 ? ? ns mtc20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 20 ? 1.75 t cy + 20 ns note 1: these parameters are characterized, but are not tested in manufacturing.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 420 ? 2009-2012 microchip technology inc. table 28-9: simple ocx/pwmx mode timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial param no. symbol characteristic ( 1 ) min typ max units conditions moc15 t fd fault input to pwm i/o change ??t cy + 10 ns moc20 t flt fault input pulse width t cy + 10 ? ? ns note 1: these parameters are characterized but not tested in manufacturing.
? 2009-2012 microchip technology inc. ds70591e-page 421 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 29.0 dc and ac device characteristics graphs figure 29-1: v oh ? 4x driver pins figure 29-2: v oh ? 8x driver pins figure 29-3: v oh ? 16x driver pins note: the graphs provided following this note are a statistical summary based on a limited number of sa mples and are provided for des ign guidance purposes only. the performance characteristics listed herein are not tested or guaranteed. in so me graphs, the data presented may be out side the specified operating range (e.g., outside specified power supply rang e) and therefore, outsi de the warranted range. -0.030 -0.025 -0.020 -0.015 -0.010 ioh (a) -0.030 -0.025 -0.020 -0.015 -0.010 -0.005 0.000 0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 ioh (a) voh (v) 3v 3.3v 3.6v absolute maximum -0.040 -0.035 -0.030 -0.025 -0.020 -0.015 ioh (a) -0.040 -0.035 -0.030 -0.025 -0.020 -0.015 -0.010 -0.005 0.000 0.00 1.00 2.00 3.00 4.00 ioh (a) voh (v) 3v 3.3v 3.6v absolute maximum -0.080 -0.070 -0.060 -0.050 -0.040 -0.030 -0.020 ioh (a) -0.080 -0.070 -0.060 -0.050 -0.040 -0.030 -0.020 -0.010 0.000 0.00 1.00 2.00 3.00 4.00 ioh (a) voh (v) 3v 3.3v 3.6v absolute maximum
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 422 ? 2009-2012 microchip technology inc. figure 29-4: v ol ? 4x driver pins figure 29-5: v ol ? 8x driver pins figure 29-6: v ol ? 16x driver pins 0.010 0.015 0.020 0.025 0.030 0.035 0.040 iol (a) 0.000 0.005 0.010 0.015 0.020 0.025 0.030 0.035 0.040 0.00 1.00 2.00 3.00 4.00 iol (a) vol (v) 3v 3.3v 3.6v absolute maximum 0.020 0.030 0.040 0.050 0.060 iol (a) 0.000 0.010 0.020 0.030 0.040 0.050 0.060 0.00 1.00 2.00 3.00 4.00 iol (a) vol (v) 3v 3.3v 3.6v absolute maximum 0.040 0.060 0.080 0.100 0.120 iol (a) 0.000 0.020 0.040 0.060 0.080 0.100 0.120 0.00 1.00 2.00 3.00 4.00 iol (a) vol (v) 3v 3.3v 3.6v absolute maximum
? 2009-2012 microchip technology inc. ds70591e-page 423 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 30.0 packaging information 30.1 package marking information legend: xx...x customer-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week ?01?) nnn alphanumeric traceability code pb-free jedec designator for matte tin (sn) * this package is pb-free. the pb-free jedec designator ( ) can be found on the outer packaging for this package. note: if the full microchip part number cannot be mark ed on one line, it is carried over to the next line, thus limiting the number of available characters for customer-specific information. 3 e 3 e 64-lead tqfp (10x10x1mm) xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx yywwnnn example dspic33fj 32gs406 1210017 80-lead tqfp (12x12x1mm) xxxxxxxxxxxx xxxxxxxxxxxx yywwnnn example 33fj32gs608 -i/pt 1210017 -i/pt 3 e 3 e 64-lead qfn (9x9x0.9mm) example xxxxxxxxxx xxxxxxxxxx yywwnnn 33fj32fj32 gs406-i/mr 1210017 3 e
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 424 ? 2009-2012 microchip technology inc. 30.1 package marking information (continued) 100-lead tqfp (14x14x1mm) xxxxxxxxxxxx xxxxxxxxxxxx yywwnnn example 33fj32gs610 -i/pf 1210017 3 e 100-lead tqfp (12x12x1 mm) xxxxxxxxxxxx xxxxxxxxxxxx yywwnnn example dspic33fj64 gs608-i/pt 1210017 3 e
? 2009-2012 microchip technology inc. ds70591e-page 425 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 30.2 package details note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 426 ? 2009-2012 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
? 2009-2012 microchip technology inc. ds70591e-page 427 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 428 ? 2009-2012 microchip technology inc. 
       
     !" #$  %
& '  (   !" # $% &" '  ()"&'"!&)  & #*&&  & #    + '% ! & !  
& ,!- '    ' !! #.#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
.0/ 1+2 1 !' !  &  $ & " !**&"&&   ! .32  %   ' !("!" *&"&&   (%%' &
"
! ! ' ( 3& '!&" &
4 # * !(
 ! ! & 
 4  
% & & # & &&
255***'
'5
4  6&! 77.. ' !7'&! 8 89 : 8"') %7 #! 8 ; 7 #& /1+ 9  <  &  = =  # # 4 4 !!  /  / & #%%  / = / 3&7  & 7 / ; / 3&
& 7 .3 3&  > /> > 9  ?#& . 1+ 9  7  &  1+ # # 4 ?#& . 1+ # # 4 7  &  1+ 7 #4 !!   =  7 #?#& )    # %&  
> > > # %&  1&&' > > > d d1 e e1 e b n note 1 123 note 2 c l a1 l1 a2 a 
    * + @/1
? 2009-2012 microchip technology inc. ds70591e-page 429 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 430 ? 2009-2012 microchip technology inc. )
       
  ##   !" #$  %
& '  (   !" # $% &" '  ()"&'"!&)  & #*&&  & #    + '% ! & !  
& ,!- '    ' !! #.#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
.0/ 1+2 1 !' !  &  $ & " !**&"&&   ! .32  %   ' !("!" *&"&&   (%%' &
"
! ! ' ( 3& '!&" &
4 # * !(
 ! ! & 
 4  
% & & # & &&
255***'
'5
4  6&! 77.. ' !7'&! 8 89 : 8"') %7 #! 8 @ 7 #& /1+ 9  <  &  = =  # # 4 4 !!  /  / & #%%  / = / 3&7  & 7 / ; / 3&
& 7 .3 3&  > /> > 9  ?#& . 1+ 9  7  &  1+ # # 4 ?#& . 1+ # # 4 7  &  1+ 7 #4 !!   =  7 #?#& )    # %&  
> > > # %&  1&&' > > > d d1 e e1 e b n note 1 123 note 2 a a2 l1 a1 l c 
    * + 1
? 2009-2012 microchip technology inc. ds70591e-page 431 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 432 ? 2009-2012 microchip technology inc. 
       
  ##   !" #$  %
& '  (   !" # $% &" '  ()"&'"!&)  & #*&&  & #    + '% ! & !  
& ,!- '    ' !! #.#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
.0/ 1+2 1 !' !  &  $ & " !**&"&&   ! .32  %   ' !("!" *&"&&   (%%' &
"
! ! ' ( 3& '!&" &
4 # * !(
 ! ! & 
 4  
% & & # & &&
255***'
'5
4  6&! 77.. ' !7'&! 8 89 : 8"') %7 #! 8  7 #& 1+ 9  <  &  = =  # # 4 4 !!  /  / & #%%  / = / 3&7  & 7 / ; / 3&
& 7 .3 3&  > /> > 9  ?#& . 1+ 9  7  &  1+ # # 4 ?#& . 1+ # # 4 7  &  1+ 7 #4 !!   =  7 #?#& )  @  # %&  
> > > # %&  1&&' > > > d d1 e e1 e b n 123 note 1 note 2 c l a1 l1 a a2 
    * + 1
? 2009-2012 microchip technology inc. ds70591e-page 433 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 434 ? 2009-2012 microchip technology inc. 
       
     !" #$  %
& '  (   !" # $% &" '  ()"&'"!&)  & #*&&  & #    + '% ! & !  
& ,!- '    ' !! #.#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
.0/ 1+2 1 !' !  &  $ & " !**&"&&   ! .32  %   ' !("!" *&"&&   (%%' &
"
! ! ' ( 3& '!&" &
4 # * !(
 ! ! & 
 4  
% & & # & &&
255***'
'5
4  6&! 77.. ' !7'&! 8 89 : 8"') %7 #! 8  7 #& /1+ 9  <  &  = =  # # 4 4 !!  /  / & #%%  / = / 3&7  & 7 / ; / 3&
& 7 .3 3&  > /> > 9  ?#& . ;1+ 9  7  &  ;1+ # # 4 ?#& . 1+ # # 4 7  &  1+ 7 #4 !!   =  7 #?#& )    # %&  
> > > # %&  1&&' > > > d d1 e b e1 e n note 1 note 2 123 c l a1 l1 a2 a 
    * + 1
? 2009-2012 microchip technology inc. ds70591e-page 435 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 436 ? 2009-2012 microchip technology inc. notes:
? 2009-2012 microchip technology inc. ds70591e-page 437 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 appendix a: migrating from dspic33fj06g s101/x02 and dspic33fj16gsx02/x04 to ds pic33fj32gs406/606/608/610 and dspic33fj64gs406/606 /608/610 devices this appendix provides an overview of considerations for migrating from the dspic33fj06gs101/x02 and dspic33fj16gsx02/x04 family of devices to the dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 family of devices. the code developed for the dspic33fj06gs101/x02 and dspic33fj16gsx02/x04 devices can be ported to the dspic33fj32g s406/606/608/610 and dspic33fj64gs406/606/608/610 devices after making the appropriate changes outlined below. a.1 device pins and peripheral pin select (pps) on dspic33fj06gs101/x02 and dspic33fj16gsx02/x04 devices, some peripherals such as the timer, input capture, output compare, uart, spi, external interrupts, analog comparator output, as well as the pwm4 pin pair, were mapped to physical pins via perip heral pin select (pps) functionality. on dspi c33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 devices, these peripherals are hard-coded to dedicated pins. because of this, as well as pinout differences between the two devices families, software must be updated to utilize peripherals on the desired pin locations. a.2 high-speed pwm a.2.1 fault and current-limit control signal source selection fault and current-limit control signal source selec- tion has changed between the two families of devices. on dspic33fj06gs101/x02 and dspic33fj16gsx02/x04 devi ces, fault1 through fault8 were assigned to fault and current-limit controls with the following values: ? 00000 = fault 1 ? 00001 = fault 2 ? 00010 = fault 3 ? 00011 = fault 4 ? 00100 = fault 5 ? 00101 = fault 6 ? 00110 = fault 7 ? 00111 = fault 8 on dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608 /610 devices, fault1 through fault8 were assigned to fault and current- limit controls with the following values: ? 01000 = fault 1 ? 01001 = fault 2 ? 01010 = fault 3 ? 01011 = fault 4 ? 01100 = fault 5 ? 01101 = fault 6 ? 01110 = fault 7 ? 01111 = fault 8 a.2.2 analog comparators connection connection of analog comparators to the pwm fault and current-limit control signal sources on dspic33fj06gs101/x02 and dspic33fj16gsx02/ x04 devices is performed by assigning a comparator to one of the fault sources via the virtual pps pins, and then selecting the desired fault as the source for fault and current-limit control. on dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 devices, analog comparators have a direct connection to fault and current-limit control, and can be selected with the following values for the clsrc or fltsrc bits: ? 00000 = analog comparator 1 ? 00001 = analog comparator 2 ? 00010 = analog comparator 3 ? 00011 = analog comparator 4 a.2.3 leading-edge blanking (leb) the leading-edge blanking delay (leb) bits have been moved from the lebcox register on dspic33fj06gs101/x02 and dspic33fj16gsx02/ x04 devices to the lebdlyx register on dspic33fj32gs406/606/608/610 and dspic33fj64gs406/6 06/608/610 devices.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 438 ? 2009-2012 microchip technology inc. appendix b: revision history revision a (march 2009) this is the initial release of this document. revision b (november 2009) the revision includes the following global update: ? added note 2 to the shaded table that appears at the beginning of each chapter. this new note provides information regarding the availability of registers and their associated bits this revision also includes minor typographical and formatting changes throughout the data sheet text. all other major changes are referenced by their respective section in table b-1 . table b-1: major section updates section name update description ?high-performance, 16-bit digital signal controllers? added ?dma channels? column and updated the ram size to 9k for the dspic33fj64gs406 devices in the controller families table (see table 1). updated the pin diagrams as follows: ? 64-pin tqfp and qfn - removed flt8 from pin 51 - added flt8 to pin 60 - added flt17 to pin 31 - added flt18 to pin32 ? 80-pin tqfp - removed flt8 from pin 63 - added flt8 to pin 76 - added flt19 to pin 53 - added flt20 to pin 52 ? 100-pin tqfp - removed flt8 from pin 78 - added flt8 to pin 93 - added synco1 to pin 95 section 4.0 ?memory organization? added data memory map for devi ces with 8 kb ram (see figure 4-4). removed sfrs ipc25 and ipc26 from the interrupt controller register map for dspic33fj32gs406 and ds pic33fj64gs406 devices (see table 4-7). the following bits in the interrupt controller register map for dspic33fj32gs406 and dspic33fj64gs406 devices were changed to unimplemented (see table 4-7): ? bit 2 of ifs1 ? bits 9-7 of ifs6 ? bit 2 of iec1 ? bits 9-7 of iec6 ? bits 10-8 of ipc4 removed osctun2 and lfsr, updated osccon and osctun, renamed bit 13 of the refocon sfr in the system control register map from rosidl to rosslp and changed the all resets value from ? 0000 ? to ? 2300 ? for the aclkcon sfr (see table 4-56). updated bit 1 of the pmd register map for dspic33fj64gs608 devices from unimplemented to c1md (see table 4-60).
? 2009-2012 microchip technology inc. ds70591e-page 439 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 section 9.0 ?oscillator configuration? removed section 9.2 ?frc tuning?. removed the prcden, tseqen, and lp oscen bits from the oscillator control register (see register 9-1). updated the oscillator tuning register (see register 9-4). removed the oscillator tuning register 2 and the linear feedback shift register. updated the default reset values from r/w-0 to r/w-1 for the selaclk and apstsclr<2:0> bits in the ac lkcon register (see register 9-5). renamed the rosidl bit to rossl p in the refocon register (see register 9-6). section 10.0 ?power-saving features? updated the last paragraph of section 10.2.2 ?idle mode? to clarify when instruction execution begins. added note 1 to the pmd1 register (see register 10-1). section 11.0 ?i/o ports? changed the reference to digital-only pins to 5v tolerant pins in the second paragraph of section 11.2 ?open-drain configuration? . section 16.0 ?high-speed pwm? updated the high-speed pwm module register interconnect diagram (see figure 16-2). updated the syncsrc<2:0> = 111 , 101 , and 100 definitions to reserved in the ptcon and stcon registers (see register 16-1 and register 16-5). updated the pwm time base maximum value from 0xfffb to 0xfff8 in the ptper register (register 16-3). updated the smallest pulse width value from 0x0008 to 0x0009 in note 1 of the shaded note that follows the mdc register (see register 16-10). updated the smallest pulse width value from 0x0008 to 0x0009 in note 2 of the shaded note that follows th e pdcx and sdcx registers (see register 16-12 and register 16-13). added note 2 and updated the fltdat<1:0> and cldat<1:0> bits, changing the word ?data? to ?sta te? in the ioconx register (see register 16-19). section 20.0 ?universal asynchronous receiver transmitter (uart)? updated the two baud rate range featur es to: 10 mbps to 38 bps at 40 mips. section 22.0 ?high-speed 10-bit analog-to-digital converter (adc)? updated the trgsrcx<4:0> = 01101 definition from reserved to pwm secondary special event trigger sele cted, and updated note 1 in the adcp0-adcp6 registers (see regi ster 22-6 through register 22-12). section 24.0 ?special features? updated the second paragraph and re moved the fourth paragraph in section 24.1 ?configuration bits? . updated the device configuration register map (see table 24-1). table b-1: major section updates (continued) section name update description
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 440 ? 2009-2012 microchip technology inc. section 27.0 ?electrical characteristics? updated the absolute maximum ratings for high temperature and added note 4. updated all operating current (i dd ) typical and max values in table 27-5. updated all idle current (i idle ) typical and max values in table 27-6. updated all power-down current (i pd ) typical and max values in table 27-7. updated all doze current (i doze ) typical and max values in table 27-8. updated the typ and max values for parameter d150 and removed parameters di26, di28, and di29 from the i/o pin input specifications (see table 27-9). updated the typ and max values for parameter do10 and do27 and the min and typ values for parameter do20 in the i/o pin output specifications (see table 27-10). added parameter numbers to the auxiliary pll clock timing specifications (see table 27-18). added parameters numbers and updated the internal rc accuracy min, typ, and max values (see table 27-19 and table 27-20). added parameter numbers, note 2, updated the min and typ parameter values for mp31 and mp32, and removed the conditions for mp10 and mp11 in the high-speed pwm module timing requirements (see table 27-29). updated the spix module slave mode (cke = 1 ) timing characteristics (see figure 27-14). added parameter im51 to the i2cx bus data timing requirements (master mode) (see table 27-34). updated the max value for parameter ad33 in the 10-bit high-speed adc module specifications (see table 27-36). updated the titles and added parameter numbers to the comparator and dac module specifications (see table 27-38 and table 27-39) and the dac output buffer specifications (see table 27-40). table b-1: major section updates (continued) section name update description
? 2009-2012 microchip technology inc. ds70591e-page 441 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 revision c (february 2010) this revision includes minor typographical and formatting changes throughout the data sheet text. all other changes are referenced by their respective section in ta b l e b - 2 . table b-2: major section updates section name update description section 16.0 ?high-speed pwm? added note 2 to ptper (register 16-3). added note 1 to sevt cmp (register 16-4). updated note 1 in mdc (register 16-10). updated note 5 and added note 6 to pwmconx (register 16-11). updated note 1 in pdcx (register 16-12). updated note 1 in sdcx (register 16-13). updated note 1 and note 2 in phasex (register 16-14). updated note 2 in sph asex (register 16-15). updated note 1 in fclconx (register 16-21). added note 1 to strigx (register 16-22). updated leading-edge blanking delay increment value from 8.4 ns to 8.32 ns and added a shaded note in lebdlyx (register 16-24). added note 3 and note 4 to pwmcapx (register 16-26). section 27.0 ?electrical characteristics? updated the min and typ values for the internal voltage regulator specifications in table 27-13. updated the min and max values for the internal rc accuracy specifications in table 27-20.
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 442 ? 2009-2012 microchip technology inc. revision d (january 2012) this revision includes minor typographical and formatting changes throughout the data sheet text. all occurrences of pgcn and pgdn (where n = 1, 2, or 3) were updated to: pgecn and pgedn throughout the document. all other changes are referenced by their respective section in ta b l e b - 3 . table b-3: major section updates section name update description ?16-bit digital signal controllers with high-speed pwm, adc and comparators? added 50 mips to operating range. changed the oscillator frequency range in system management. added the ?referenced sources? section. section 1.0 ?device overview? updated the block diagram of the core and peripheral modules (see figure 1-1 ). section 2.0 ?guidelines for getting started with 16-bit digital signal controllers? updated the recommended minimum connection diagram (see figure 2-1 ). updated the v cap pin capacitor specification in section 2.3 ?capacitor on internal voltage regulator (v cap )? . section 4.0 ?memory organization? removed ipc20 and updated ifs5, ifs7, iec5, iec7, and ipc29 in the interrupt controller register map for DSPIC33FJ64GS606 devices (see table 4-6 ). removed ipc20 and ipc21 and updated ifs5, ifs7, iec5, iec7, and ipc29 in the interrupt controller register map for dspic33fj32gs406 and dspic33fj64gs406 devices (see ta b l e 4 - 7 ). removed ipc20 and updated ifs5, ifs7, iec5, iec7, and ipc29 in the interrupt controller register map for dspic33fj32gs606 devices (see table 4-10 ). added high-speed 10-bit adc register map for dspic33fj32gs406 and dspic33fj64gs406 devices (see ta b l e 4 - 3 5 ). updated odcg in portg register map for dspic33fj32gs610 and dspic33fj64gs610 devices (see ta b l e 4 - 5 4 ). updated odcg in portg register map for dspic33fj32gs608 and dspic33fj64gs608 devices (see ta b l e 4 - 5 5 ). updated odcg in portg register map for dspic33fj32gs406/606 and dspic33fj64gs406/606 devices (see ta b l e 4 - 5 6 ). section 9.0 ?oscillator configuration? changed the high-speed crystal (hs) frequency range in section 9.1.1 ?system clock sources? . updated the device operating speed to up to 50 mhz in section 9.1.2 ?system clock selection? . updated section 9.1.3 ?pll configuration? to reflect the new operating range/speed of 50 mips/50 mhz. updated section 9.2 ?auxiliary clock generation? . section 22.0 ?high-speed, 10-bit analog- to-digital converter (adc)? updated the adc block diagram for dspic33fj32gs406 and dspic33fj64gs406 devices with one sar (see ta b l e 2 2 - 1 ). added note 2 to adcpc6: adc convert pair control register 6 (see register 22-12 ).
? 2009-2012 microchip technology inc. ds70591e-page 443 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 section 23.0 ?high-speed analog comparator? added note 1 to the high-speed analog comparator module block diagram (see figure 23-1 ). section 24.0 ?special features? updated section 24.1 ?configuration bits? . added the rtsp effect column to the dspic33f configuration bits description (see ta b l e 2 4 - 2 ). added note 3 to the connections for the on-chip voltage regulator (see figure 24-1 ). section 27.0 ?electrical characteristics? updated the absolute maximum ratings. updated the operating mips vs. voltage and added note 1 (see table 27-1 ). updated note 4 and removed parameter dc18 from the dc temperature and voltage specifications (see ta b l e 2 7 - 4 ). updated note 2, typical and maximum values for parameters dc20- dc24, and the conditions for para meters dc25-dc28 in the operating current dc characteristics (see table 27-5 ). updated note 2 in the idle current dc characteristics (see table 27-6 ). updated note 2 in the power-down current dc characteristics (see table 27-7 ). added note 2 to the doze current dc characteristics (see table 27-8 ). added parameters di60a, di60b, and di60c to the i/o pin input specifications (see table 27-9 ). updated all i/o pin output specifications (see table 27-10 ). updated parameter bo10 and added note 2 and note 3 to the bor electrical characteristics (see table 27-11 ). added note 1 to the internal voltage regulator specifications (see table 27-13 ). updated the os25 parameter in the external clock timing diagram (see figure 27-2 ). added the secondary oscillator (sosc) to parameter os10, added parameter os42 (g m ), and added note 2 to the external clock timing requirements (see table 27-16 ). updated note 2 in the internal fr c accuracy ac characteristics (see table 27-19 ). updated parameters do31 and do32 in the i/o timing requirements (see table 27-21 ). table b-3: major section updates (continued) section name update description
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 444 ? 2009-2012 microchip technology inc. revision e (october 2012) this revision removes the preliminary watermark and includes minor typographical and formatting changes throughout the data sheet. section 27.0 ?electrical characteristics? (continued) updated the timer1, timer2, and timer3 external clock timing requirements (see table 27-23 , table 27-24 , and table 27-25 ). updated the simple oc/pwm mode timing requirements (see table 27-28 ). updated all spi timing specifications (see figure 27-11 - figure 27-18 and table 27-30 - table 27-37 ). added note 2 to the 10-bit high-speed adc module specifications (see table 27-40 ). added note 2 to the 10-bit high-speed adc module timing requirements (see table 27-41 ). added parameter da08 to the dac module specifications (see table 27-43 ). updated parameter da16 in the dac output buffer specifications (see table 27-44 ). added dma read/write timing requirements (see table 27-49 ). section 28.0 ?50 mips electrical characteristics? added new chapter with electrical specifications for 50 mips devices. section 29.0 ?dc and ac device characteristics graphs? added new chapter. table b-3: major section updates (continued) section name update description
? 2009-2012 microchip technology inc. ds70591e-page 445 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 index a ac characteristics ............................................................ 378 10-bit, high-speed adc ........................................... 406 internal frc accuracy.............................................. 381 internal lprc accuracy............................................ 381 load conditions ........................................................ 378 temperature and voltage specifications .................. 378 alternate interrupt vector table (aivt) ............................ 123 arithmetic logic unit (alu)................................................. 39 assembler mpasm assembler................................................... 362 b barrel shifter ....................................................................... 43 bit-reversed addressing .................................................. 102 example .................................................................... 103 implementation ......................................................... 102 sequence table (16-entry)....................................... 103 block diagrams 16-bit timer1 module................................................ 215 ac-to-dc power supply with pfc and 3 outputs ...... 32 adc module with 1 sar for dspic33fj32gs406, dspic33fj64gs406 devices ............................... 311 adc module with 2 sars for dspic33fj32gs606, DSPIC33FJ64GS606 devices ............................... 312 adc module with 2 sars for dspic33fj32gs608, dspic33fj64gs608 devices ............................... 313 adc module with 2 sars for dspic33fj32gs610, dspic33fj64gs610 devices ............................... 314 boost converter implementation ................................ 27 conceptual high-speed pwmx ................................ 231 connections for on-chip voltage regulator............. 349 digital pfc.................................................................. 27 dma top level system architecture using dedicated transaction bus............................... 178 dsp engine ................................................................ 40 dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 ...................... 18 dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 cpu core .... 34 ecanx module ......................................................... 282 high-speed analog comparator x module ............... 341 high-speed pwmx architecture ............................... 230 i 2 c module ................................................................ 268 input capture x ......................................................... 223 interleaved pfc .......................................................... 30 multi-phase synchronous buck converter ................. 28 off-line ups................................................................ 29 oscillator system ...................................................... 188 output compare module........................................... 225 phase-shifted full-bridge converter .......................... 31 pll............................................................................ 190 quadrature encoder interface x................................ 257 reset system............................................................ 115 shared port structure ............................................... 212 simplified uart module........................................... 275 single-phase synchronous buck converter............... 28 spi module ............................................................... 261 timer2/3/4/5 (32-bit) ................................................. 219 type b timer ............................................................ 217 type c timer ............................................................ 217 watchdog timer (wdt) ............................................ 350 brown-out reset (bor) .................................... 119, 345, 349 c c compilers mplab c18.............................................................. 362 clock generation auxiliary .................................................................... 191 reference ................................................................. 191 clock switching ................................................................ 199 enabling.................................................................... 199 sequence ................................................................. 199 code examples erasing a program memory page ............................ 113 initiating a programming sequence ......................... 114 loading write buffers ............................................... 114 port write/read ........................................................ 213 pwrsav instruction syntax .................................... 201 code protection ........................................................ 345, 352 codeguard security ................................................. 345, 352 configuration bits ............................................................. 345 description................................................................ 346 configuration register map .............................................. 345 configuring analog port pins............................................ 213 cpu control registers........................................................ 36 cpu clocking system ...................................................... 189 pll configuration..................................................... 190 selection................................................................... 189 sources .................................................................... 189 customer change notification service............................. 451 customer notification service .......................................... 451 customer support............................................................. 451 d data accumulators and adder/subtracter .......................... 41 data space write saturation ...................................... 43 overflow and saturation ............................................. 41 round logic ............................................................... 42 write back .................................................................. 42 data address space........................................................... 47 alignment.................................................................... 47 memory map for 4-kbyte ram devices ..................... 48 memory map for 8-kbyte ram devices ..................... 49 memory map for 9-kbyte ram devices ..................... 50 near data space ........................................................ 47 sfr space ................................................................. 47 software stack ........................................................... 99 width .......................................................................... 47 dc and ac characteristics graphs and tables ................................................... 421 dc characteristics brown-out reset (bor)............................................ 376 doze current (i doze )................................................ 372 i/o pin input specifications ...................................... 373 i/o pin output specifications.................................... 375 idle current (i idle ) .................................................... 370 internal voltage regulator specifications................. 377 operating current (i dd ) ............................................ 368 operating mips vs. voltage ..................................... 366 power-down current (i pd )........................................ 371 program memory...................................................... 377 temperature and voltage specifications.................. 367
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 446 ? 2009-2012 microchip technology inc. dc characteristics (50 mips) doze current (i doze ) ................................................ 416 idle current (i idle ) .................................................... 415 operating current (i dd )............................................. 414 operating mips vs. voltage...................................... 414 development support ....................................................... 361 dma controller channel to peripheral associations .......................... 177 registers ................................................................... 178 doze mode........................................................................ 202 dsp engine......................................................................... 39 multiplier...................................................................... 41 e ecan module frame types ............................................................. 281 modes of operation .................................................. 283 overview ................................................................... 281 ecanx message buffers ecanx word 0.......................................................... 305 ecanx word 1.......................................................... 305 ecanx word 2.......................................................... 306 ecanx word 3.......................................................... 306 ecanx word 4.......................................................... 307 ecanx word 5.......................................................... 307 ecanx word 6.......................................................... 308 ecanx word 7.......................................................... 308 electrical characteristics................................................... 365 absolute maximum ratings ...................................... 365 ac characteristics and timing parameters .............. 378 electrical characteri stics (50 mips).................................. 413 ac characteristics and timing parameters .............. 417 enhanced can (ecan) module ....................................... 281 equations device operating frequency .................................... 189 f osc calculation....................................................... 190 maximum row write time ........................................ 110 minimum row write time ......................................... 110 programming time ................................................... 110 xt with pll mode example...................................... 190 errata .................................................................................. 14 external reset (extr)...................................................... 120 f fail-safe clock monitor (fscm) ....................................... 199 flash program memory..................................................... 109 control registers ...................................................... 110 operations ................................................................ 110 programming algorithm ............................................ 113 rtsp operation........................................................ 110 table instructions...................................................... 109 flexible configuration ....................................................... 345 g getting started with 16-bit dscs........................................ 23 application connection examples .............................. 26 capacitor on internal voltage regulator (v cap ) ......... 24 configuring analog and digital pins during icsp operations ................................................. 26 connection requirements .......................................... 23 decoupling capacitors ................................................ 23 external oscillator pins ............................................... 25 icsp pins.................................................................... 25 master clear (mclr ) .................................................. 24 oscillator value conditions on start-up ...................... 26 unused i/os ................................................................ 26 h high-speed analog comparator....................................... 341 applications .............................................................. 342 control registers ...................................................... 342 dac .......................................................................... 342 output range ................................................... 342 digital logic .............................................................. 342 features overview.................................................... 341 interaction with i/o buffers ....................................... 342 module description ................................................... 341 high-speed pwm ............................................................. 229 control registers ...................................................... 232 high-speed, 10-bit adc control registers ...................................................... 310 description................................................................ 309 module functionality................................................. 310 i i/o ports............................................................................ 211 parallel i/o (pio) ...................................................... 211 write/read timing .................................................... 213 i 2 c operating modes ...................................................... 267 registers .................................................................. 267 illegal opcode reset (iopuwr) ...................................... 120 in-circuit debugger........................................................... 351 in-circuit emulation .......................................................... 345 in-circuit serial programming (icsp)....................... 345, 351 input capture .................................................................... 223 control registers ...................................................... 224 input change notification ................................................. 213 instruction addressing modes ............................................ 99 file register instructions ............................................ 99 fundamental modes supported ............................... 100 mac instructions ...................................................... 100 mcu instructions ........................................................ 99 move and accumulator instructions.......................... 100 other instructions ..................................................... 100 instruction set overview................................................................... 356 summary .................................................................. 353 symbols used in opcode descriptions .................... 354 instruction-based power-saving modes........................... 201 idle ............................................................................ 202 sleep ........................................................................ 201 interfacing program and data memory spaces................ 104 internet address ............................................................... 451 interrupt control and status registers ............................. 127 iecx .......................................................................... 127 ifsx .......................................................................... 127 intcon1 .................................................................. 127 intcon2 .................................................................. 127 inttreg .................................................................. 127 ipcx .......................................................................... 127 interrupt vector table (ivt) .............................................. 123 interrupts setup procedures ..................................................... 176 initialization....................................................... 176 interrupt disable ............................................... 176 interrupt service routine.................................. 176 trap service routine........................................ 176 j jtag boundary scan interface ........................................ 345 jtag interface.................................................................. 351
? 2009-2012 microchip technology inc. ds70591e-page 447 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 l leading-edge blanking (leb)........................................... 229 lprc oscillator use with wdt ........................................................... 349 m memory organization.......................................................... 45 microchip internet web site .............................................. 451 migrating from dspic33fj06gs101/x02 and dspic33fj16gsx02/x04 to dspic33fj32gs406/606/ 608/610 and dspic33fj64gs406/606/608/610 devices ........................................................................... 437 migration analog comparators connection................................... 437 device pins and peripheral pin select (pps) ............... 437 fault and current-limit control signal source selection.................................................... 437 leading-edge blanking (leb)................................... 437 modes of operation disable ...................................................................... 283 initialization ............................................................... 283 listen all messages .................................................. 283 listen only ................................................................ 283 loopback .................................................................. 283 normal operation...................................................... 283 modulo addressing ........................................................... 101 applicability ............................................................... 102 operation example ................................................... 101 start and end address.............................................. 101 w address register selection .................................. 101 mplab asm30 assembler, linker, librarian ................... 362 mplab integrated development environment software.................................................................... 361 mplab pm3 device programmer .................................... 364 mplab real ice in-circuit emulator system................. 363 mplink object linker/mplib object librarian ................ 362 o open-drain configuration ................................................. 213 oscillator configuration..................................................... 187 control registers ...................................................... 192 output compare ............................................................... 225 modes ....................................................................... 226 p packaging ......................................................................... 423 details ....................................................................... 425 marking ..................................................................... 423 peripheral module disable (pmd) .................................... 203 pinout i/o descriptions (table) ............................................ 19 power save instructions coincident interrupts................................................. 202 power-on reset (por) ..................................................... 119 power-saving features .................................................... 201 clock frequency ....................................................... 201 clock switching......................................................... 201 power-up timer (pwrt) .................................................. 119 program address space ..................................................... 45 construction.............................................................. 104 data access from program memory using program space visibility ................................... 107 data access from program memory using table instructions ............................................. 106 data access from, ad dress generation.................... 105 memory maps ............................................................. 45 table read high instructions tblrdh ........................................................... 106 table read low instructions tblrdl............................................................ 106 visibility operation.................................................... 107 program memory interrupt vector........................................................... 46 organization ............................................................... 46 reset vector............................................................... 46 programmer?s model .......................................................... 35 pwm power-saving features ............................................ 202 q quadrature encoder interface (qei)................................. 257 r rcon register use of status bits ..................................................... 121 reader response............................................................. 452 register maps analog comparator control........................................ 91 change notification (dspic33fj32gs406/606 and dspic33fj64gs406/606 devices)..................... 54 change notification (dspic33fj32gs608/610 and dspic33fj64gs608/601 devices)..................... 54 cpu core ................................................................... 52 dma............................................................................ 87 ecan1 (win (c1ctrl1) = 0 or 1)............................. 88 ecan1 (win (c1ctrl1) = 0).................................... 88 ecan1 (win (c1ctrl1) = 1).................................... 89 high-speed 10-bit adc module (dspic33fj32gs608 and dspic33fj64gs608 devices)......................... 84 high-speed 10-bit adc module (dspic33fj32gs610 and dspic33fj64gs610 devices)......................... 82 high-speed 10-bit adc module (for dspic33fj32gs406 and dspic33fj64gs406 devices)......................... 86 high-speed 10-bit adc module (for dspic33fj32gs606 and DSPIC33FJ64GS606 devices)......................... 85 high-speed pwm....................................................... 71 high-speed pwm generator 1................................... 71 high-speed pwm generator 2................................... 72 high-speed pwm generator 3................................... 73 high-speed pwm generator 4................................... 74 high-speed pwm generator 5................................... 75 high-speed pwm generator 6................................... 76 high-speed pwm generator 7 (all devices except dspic33fj32gs406 and dspic33fj64gs406).... 77 high-speed pwm generator 8 (all devices except dspic33fj32gs406 and dspic33fj64gs406).... 78 high-speed pwm generator 9 (dspic33fj32gs610 and dspic33fj64gs610 devices)......................... 79 i2c1 ............................................................................ 79 i2c2 ............................................................................ 80 input capture.............................................................. 69 interrupt controller (dspic33fj32gs406 and dspic33fj64gs406 devices)............................ 61 interrupt controller (dspic33fj32gs606 devices) .......................... 67 interrupt controller (dspic33fj32gs608 devices) .......................... 65 interrupt controller (dspic33fj32gs610 devices) .......................... 63 interrupt controller (DSPIC33FJ64GS606 devices) .......................... 59
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 448 ? 2009-2012 microchip technology inc. interrupt controller (dspic33fj64gs608 devices)........................... 57 interrupt controller (dspic33fj64gs610 devices)........................... 55 nvm ............................................................................ 96 output compare ......................................................... 70 pmd (dsipc33fj64gs606 devices) .......................... 97 pmd (dspic33fj32gs406 and dspic33fj64gs406 devices) ............................ 98 pmd (dspic33fj32gs606 devices) .......................... 98 pmd (dspic33fj32gs608 devices) .......................... 97 pmd (dspic33fj32gs610 devices) .......................... 96 pmd (dspic33fj64gs608 devices) .......................... 97 pmd (dspic33fj64gs610 devices) .......................... 96 porta (dspic33fj32gs608 and dspic33fj64gs608 devices) ............................ 91 porta (dspic33fj32gs610 and dspic33fj64gs610 devices) ............................ 91 portb........................................................................ 92 portc (dspic33fj32gs406/606 and dspic33fj64gs406/606 devices) ..................... 92 portc (dspic33fj32gs608 and dspic33fj64gs608 devices) ............................ 92 portc (dspic33fj32gs610 and dspic33fj64gs610 devices) ............................ 92 portd (dspic33fj32gs406/606 and dspic33fj64gs406/606 devices) ..................... 93 portd (dspic33fj32gs608/610 and dspic33fj64gs608/610 devices) ..................... 93 porte (dspic33fj32gs406/606 and dspic33fj64gs406/606 devices) ..................... 93 porte (dspic33fj32gs608/610 and dspic33fj64gs608/610 devices) ..................... 93 portf (dspic33fj32gs406/606 and dspic33fj64gs406/606 devices) ..................... 94 portf (dspic33fj32gs608 and dspic33fj64gs608 devices) ............................ 94 portf (dspic33fj32gs610 and dspic33fj64gs610 devices) ............................ 94 portg (dspic33fj32gs406/606 and dspic33fj64gs406/606 devices) ..................... 95 portg (dspic33fj32gs608 and dspic33fj64gs608 devices) ............................ 95 portg (dspic33fj32gs610 and dspic33fj64gs610 devices) ............................ 94 quadrature encoder interface 1 (qei1) ...................... 70 quadrature encoder interface 2 (qei2) ...................... 70 spi1 ............................................................................ 81 spi2 ............................................................................ 81 system control ........................................................... 95 timers ......................................................................... 69 uart1 ........................................................................ 80 uart2 ........................................................................ 80 registers aclkcon (auxiliary clock divisor control) ............. 197 adbase (adc base) ............................................... 318 adc base register (adbase) ................................. 318 adcon (adc control) ............................................. 315 adcpc0 (adc convert pair control 0) .................... 320 adcpc1 (adc convert pair control 1) .................... 323 adcpc2 (adc convert pair control 2) .................... 326 adcpc3 (adc convert pair control 3) .................... 329 adcpc4 (adc convert pair control 4) .................... 332 adcpc5 (adc convert pair control 5) .................... 335 adcpc6 (adc convert pair control 6) .................... 338 adpcfg (adc port configuration) .......................... 319 adpcfg2 (adc port configuration 2) ..................... 319 adstat (adc status) ............................................. 317 altdtrx (pwm alternate dead-time x)................. 246 auxconx (pwm auxiliary control x) ...................... 255 chop (pwm chop clock generator) ...................... 239 clkdiv (clock divisor) ............................................ 194 cmpconx (comparator control x) .......................... 343 cmpdacx (comparator dac control x) .................. 344 corcon (core control) .................................... 38, 128 cxbufpnt1 (ecanx filter 0-3 buffer pointer 1)..... 294 cxbufpnt2 (ecanx filter 4-7 buffer pointer 2)..... 295 cxbufpnt3 (ecanx filter 8-11 buffer pointer 3) ............................................... 296 cxbufpnt4 (ecanx filter 12-15 buffer pointer 4) ............................................... 297 cxcfg1 (ecanx baud rate configuration 1) ......... 292 cxcfg2 (ecanx baud rate configuration 2) ......... 293 cxctrl1 (ecanx control 1) ................................... 284 cxctrl2 (ecanx control 2) ................................... 285 cxec (ecanx transmit/receive error count)......... 292 cxfctrl (ecanx fifo control)............................. 287 cxfen1 (ecanx acceptanc e filter enable 1) ......... 294 cxfifo (ecanx fifo status).................................. 288 cxfmsksel1 (ecanx filter 7-0 mask selection 1)....................................................... 299 cxfmsksel2 (ecanx filter 15-8 mask selection 2)....................................................... 300 cxinte (ecanx interrupt enable) ........................... 291 cxintf (ecanx interrupt flag)................................ 289 cxrxfneid (ecanx acceptance filter n extended identifier) .......................................... 299 cxrxfnsid (ecanx acceptance filter n standard identifier) ........................................... 298 cxrxful1 (ecanx receive buffer full 1) .............. 302 cxrxful2 (ecanx receive buffer full 2) .............. 302 cxrxmneid (ecanx acceptance filter mask n extended identifier) .......................................... 301 cxrxmnsid (ecanx acceptance filter mask n standard identifier) ........................................... 301 cxrxovf1 (ecanx receive buffer overflow 1) ..... 303 cxrxovf2 (ecanx receive buffer overflow 2) ..... 303 cxtrmncon (ecanx tx/rx buffer mn control) ............................................ 304 cxvec (ecanx interrupt code)............................... 286 dfltxcon (digital filter x control) ......................... 260 dmacs0 (dma controller status 0)......................... 183 dmacs1 (dma controller status 1)......................... 184 dmaxcnt (dma channel x transfer count) ........... 182 dmaxcon (dma channel x control)....................... 179 dmaxpad (dma channel x peripheral address) .... 181 dmaxreq (dma channel x irq select) ................. 180 dmaxsta (dma channel x ram start address offset a) ........................................................... 180 dmaxstb (dma channel x ram start address offset b) ........................................................... 181 dsadr (most recent dma ram address) ............. 185 dtrx (pwm dead-time x)....................................... 246 fclconx (pwm fault current-limit control x)....... 250 i2cxcon (i2cx control) ........................................... 269 i2cxmsk (i2cx slave mode address mask) ............ 273 i2cxstat (i2cx status) ........................................... 271 icxcon (input capture x control, x = 1, 2).............. 224 icxcon (input capture x control)............................ 224 iec0 (interrupt enable control 0) ............................. 141 iec1 (interrupt enable control 1) ............................. 143 iec2 (interrupt enable control 2) ............................. 144 iec3 (interrupt enable control 3) ............................. 145 iec4 (interrupt enable control 4) ............................. 146
? 2009-2012 microchip technology inc. ds70591e-page 449 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 iec5 (interrupt enable control 5) ............................. 147 iec6 (interrupt enable control 6) ............................. 148 iec7 (interrupt enable control 7) ............................. 149 ifs0 (interrupt flag status 0) ................................... 132 ifs1 (interrupt flag status 1) ................................... 134 ifs2 (interrupt flag status 2) ................................... 135 ifs3 (interrupt flag status 3) ................................... 136 ifs4 (interrupt flag status 4) ................................... 137 ifs5 (interrupt flag status 5) ................................... 138 ifs6 (interrupt flag status 6) ................................... 139 ifs7 (interrupt flag status 7) ................................... 140 intcon1 (interrupt control 1).................................. 129 intcon2 (interrupt control 2).................................. 131 inttreg (interrupt control and status)................... 175 ioconx (pwm i/o control x) ................................... 248 ipc0 (interrupt priority control 0) ............................. 150 ipc1 (interrupt priority control 1) ............................. 151 ipc12 (interrupt priority control 12) ......................... 160 ipc13 (interrupt priority control 13) ......................... 161 ipc14 (interrupt priority control 14) ......................... 162 ipc16 (interrupt priority control 16) ......................... 163 ipc17 (interrupt priority control 17) ......................... 164 ipc18 (interrupt priority control 18) ......................... 165 ipc2 (interrupt priority control 2) ............................. 152 ipc20 (interrupt priority control 20) ......................... 166 ipc21 (interrupt priority control 21) ......................... 167 ipc23 (interrupt priority control 23) ......................... 168 ipc24 (interrupt priority control 24) ......................... 169 ipc25 (interrupt priority control 25) ......................... 170 ipc26 (interrupt priority control 26) ......................... 171 ipc27 (interrupt priority control 27) ......................... 172 ipc28 (interrupt priority control 28) ......................... 173 ipc29 (interrupt priority control 29) ......................... 174 ipc3 (interrupt priority control 3) ............................. 153 ipc4 (interrupt priority control 4) ............................. 154 ipc5 (interrupt priority control 5) ............................. 155 ipc6 (interrupt priority control 6) ............................. 156 ipc7 (interrupt priority control 7) ............................. 157 ipc8 (interrupt priority control 8) ............................. 158 ipc9 (interrupt priority control 9) ............................. 159 lebconx (leading-edge blanking control x) ......... 253 lebdlyx (leading-edge blanking delay x)............. 254 mdc (pwm master duty cycle) ............................... 240 nvmcon (flash memory control) ........................... 111 nvmkey (nonvolatile memory key) ........................ 112 ocxcon (output compare x control, x = 1, 2) ....... 227 osccon (oscillator control) ................................... 192 osctun (oscillator tuning) .................................... 196 pdcx (pwm generator duty cycle x) ...................... 243 phasex (pwm primary phase shift x) .................... 244 pllfbd (pll feedback divisor).............................. 195 pmd1 (peripheral module disable control 1)........... 204 pmd2 (peripheral module disable control 2)........... 206 pmd3 (peripheral module disable control 3)........... 207 pmd4 (peripheral module disable control 4)........... 207 pmd6 (peripheral module disable control 6)........... 208 pmd7 (peripheral module disable control 7)........... 209 ptcon (pwm time base control) .......................... 233 ptcon2 (pwm clock divider select 2) ................... 235 ptper (primary master time base period)............. 235 pwmcapx (primary pwm time base capture x).... 256 pwmconx (pwm control x).................................... 241 qeixcon (qeix control, x = 1 or 2) ......................... 258 rcon (reset control) .............................................. 116 refocon (reference osci llator control) ............... 198 sdcx (pwm secondary duty cycle x) ..................... 243 sevtcmp (pwm special event compare) ............. 236 sphasex (pwm secondary phase shift x)............. 245 spixcon1 (spix control 1) ..................................... 263 spixcon2 (spix control 2) ..................................... 265 spixstat (spix status and control) ....................... 262 sr (cpu status) .................................................. 128 sr (cpu status) ........................................................ 36 ssevtcmp (pwm secondary special event compare).......................................................... 239 stcon (pwm secondary master time base control)........................................... 237 stcon2 (pwm secondary clock divider select 2) ........................................................... 238 stper (secondary master time base period) ....... 238 strigx (pwm secondary trigger x compare value) ............................................... 252 t1con (timer1 control) .......................................... 216 trgconx (pwm trigger control x) ........................ 247 trigx (pwm primary trigger x compare value) .... 249 txcon (timerx control, x = 2, 4)............................. 220 tycon (timery control, y = 3, 5)............................. 221 uxmode (uartx mode) ......................................... 276 uxsta (uartx status and control) ........................ 278 reset sequence ............................................................... 123 resets .............................................................................. 115 brown-out reset (bor)............................................ 115 illegal condition reset (iopuwr) ........................... 115 illegal opcode................................................... 115, 120 master clear pin reset (mclr )............................... 115 power-on reset (por)............................................. 115 security reset .......................................................... 115 software reset instruction (swr) ......................... 115 trap conflict reset (trapr) ................................... 115 uninitialized w register ................................... 115, 120 watchdog timer reset (wdto) .............................. 115 revision history................................................................ 438 s serial peripheral interface (spi) ....................................... 261 software reset instruction (swr) ................................. 120 software simulator (mplab sim) .................................... 363 software stack pointer, frame pointer call stack frame ..................................................... 99 special features of the cpu ............................................ 345 t thermal operating conditions.......................................... 366 thermal packaging characteristics .................................. 366 timer1 .............................................................................. 215 mode settings........................................................... 215 timer2/3/4/5 ..................................................................... 217 12-bit timer .............................................................. 218 16-bit operation ....................................................... 218 32-bit operation ....................................................... 218 mode settings........................................................... 218 timing diagrams analog-to-digital conv ersion per input..................... 407 brown-out situations ................................................ 119 ecan i/o.................................................................. 412 external clock .......................................................... 379 high-speed pwmx ................................................... 389 high-speed pwmx fault .......................................... 389 i/o............................................................................. 382 i2cx bus data (master mode) .................................. 402 i2cx bus data (slave mode) .................................... 404 i2cx bus start/stop bits (master mode)................... 402
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 450 ? 2009-2012 microchip technology inc. i2cx bus start/stop bits (slave mode) ..................... 404 input capture x (icx)................................................. 387 ocx/pwmx ............................................................... 388 output compare operation....................................... 226 output compare x (ocx) .......................................... 387 qea/qeb input ......................................................... 409 qei module index pulse ........................................... 410 reset, watchdog timer, oscillator start-up timer and power-up timer ......................................... 383 spix master mode (full-duplex, cke = 0, ckp = x, smp = 1)............................................ 393 spix master mode (full-duplex, cke = 1, ckp = x, smp = 1)............................................ 392 spix master mode (half-duplex, transmit only, cke = 0) ........................................................... 390 spix master mode (half-duplex, transmit only, cke = 1) ........................................................... 390 spix slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) ........................................... 400 spix slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) ........................................... 398 spix slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) ........................................... 394 spix slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) ........................................... 396 timer1/2/3 external clock......................................... 385 timerq (qei module) external clock ....................... 411 timing requirements 10-bit, high-speed adc ........................................... 407 auxiliary pll clock specifications ............................ 380 capacitive loading requirements on output pins ....................................................... 378 dma read/write ....................................................... 412 ecan i/o .................................................................. 412 external clock ........................................................... 379 high-speed pwmx ................................................... 389 i/o ............................................................................. 382 i2cx bus data (master mode) .................................. 403 i2cx bus data (slave mode) .................................... 405 input capture x (icx)................................................. 387 output compare x (ocx) .......................................... 387 pll clock specifications .......................................... 380 qei external clock.................................................... 411 qei index pulse ........................................................ 411 quadrature decoder ................................................. 410 reset, watchdog timer, oscillator start-up timer, power-up timer and brown-out reset.............. 384 simple ocx/pwmx mode ......................................... 388 spix master mode (full-duplex, cke = 0, ckp = x, smp = 1)............................................ 393 spix master mode (full-duplex, cke = 1, ckp = x, smp = 1)............................................ 392 spix master mode (half-d uplex, transmit only) ...... 391 spix slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) ........................................... 401 spix slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) ........................................... 399 spix slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) ........................................... 395 spix slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) ........................................... 397 timer1 external clock............................................... 385 timer2/4 external clock............................................ 386 timer3/5 external clock............................................ 386 timing requirements (50 mips) external clock........................................................... 417 simple ocx/pwmx mode ......................................... 420 timer1 external clock .............................................. 418 timer2/4 external clock ........................................... 419 timer3/5 external clock ........................................... 419 timing specifications comparator module .................................................. 408 dac module ............................................................. 408 dac output buffer.................................................... 409 trap conflict reset (trapr) ........................................... 120 u universal asynchronous receiver transmitter (uart) .................................................. 275 v voltage regulator (on-chip) ............................................ 349 w watchdog timer (wdt)............................................ 345, 349 programming considerations ................................... 350 watchdog timer time-out reset (wdto) ....................... 120 www address ................................................................. 451 www, on-line support ..................................................... 14
? 2009-2012 microchip technology inc. ds70591e-page 451 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 the microchip web site microchip provides online support via our www site at www.microchip.com . this web site is used as a means to make files and information easily available to customers. accessible by using your favorite internet browser, the web site contains the following information: ? product support ? data sheets and errata, application notes and sample programs, design resources, user?s guides and hardware support documents, latest software releases and archived software ? general technical support ? frequently asked questions (faqs), technical support requests, online discussion groups, microchip consultant program member listing ? business of microchip ? product selector and ordering guides, latest microchip press releases, listing of seminars and events, listings of microchip sales offices, distributors and factory representatives customer change notification service microchip?s customer notification service helps keep customers current on microchip products. subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or de velopment tool of interest. to register, access the microchip web site at www.microchip.com . under ?support?, click on ?customer change notification? and follow the registration instructions. customer support users of microchip products can receive assistance through several channels: ? distributor or representative ? local sales office ? field application engineer (fae) ? technical support ? development systems information line customers should contact their distributor, representative or field application engineer (fae) for support. local sales offices are also available to help customers. a listing of sa les offices and locations is included in the back of this document. technical support is available through the web site at: http://microchip.com/support
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 452 ? 2009-2012 microchip technology inc. reader response it is our intention to provide you with the best document ation possible to ensure succe ssful use of your microchip product. if you wish to provide your comments on organiz ation, clarity, subject matter, and ways in which our documentation can better serve you, please fax your comments to the technical publications manager at (480) 792-4150. please list the following information, and use this outli ne to provide us with your comments about this document. to: technical publications manager re: reader response total pages sent ________ from: name company address city / state / zip / country telephone: (_______) _________ - _________ application (optional): would you like a reply? y n device: literature number: questions: fax: (______) _________ - _________ ds70591e dspic33fj32gs406/606/608/610 and dspic33fj64gs406/606/608/610 1. what are the best features of this document? 2. how does this document meet your hardware and software development needs? 3. do you find the organization of this document easy to follow? if not, why? 4. what additions to the document do you th ink would enhance the structure and subject? 5. what deletions from the document could be made without affecting the overall usefulness? 6. is there any incorrect or misleading information (what and where)? 7. how would you improve this document?
? 2009-2012 microchip technology inc. ds70591e-page 453 dspic33fj32gs406/606/608/610 an d dspic33fj64g s406/606/608/610 product identification system to order or obtain information, e.g., on pricing or de livery, refer to the factory or the listed sales office . architecture: 33 = 16-bit digital signal controller flash memory family: fj = flash program memory, 3.3v product group: gs4 = switch mode power supply (smps) family gs6 = switch mode power supply (smps) family pin count: 06 = 64-pin 08 = 80-pin 10 = 100-pin speed: 50 = 50 mips = 40 mips (marking intentionally absent) temperature range: i=-40 ? c to +85 ? c (industrial) e=-40 ? c to +125 ? c (extended) package: pt = plastic thin quad flatpack - 10x10x1 mm body (tqfp) pt = plastic thin quad flatpack - 12x12x1 mm body (tqfp) pf = plastic thin quad flatpack - 14x14x1 mm body (tqfp) mr = plastic quad flat, no lead package - 9x9x0.9 mm body (qfn) examples: a) dspic33fj32gs406-50i/pt: smps dspic33, 32-kbyte program memory, 64-pin, 50 mips, industrial temp., tqfp package. microchip trademark architecture flash memory family program memory size (kb) product group pin count temperature range package pattern dspic 33 fj 32 gs4 06 t -50 i / pt - xxx tape and reel flag (if applicable) speed
dspic33fj32gs406/ 606/608/610 and dspic 33fj64gs406/606/608/610 ds70591e-page 454 ? 2009-2012 microchip technology inc. notes:
? 2012 microchip technology inc. ds70591e-page 455 information contained in this publication regarding device applications and the like is prov ided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application me ets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safe ty applications is entirely at the buyer?s risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting fr om such use. no licenses are conveyed, implicitly or ot herwise, under any microchip intellectual property rights. trademarks the microchip name and logo, th e microchip logo, dspic, flashflex, k ee l oq , k ee l oq logo, mplab, pic, picmicro, picstart, pic 32 logo, rfpic, sst, sst logo, superflash and uni/o are registered trademar ks of microchip technology incorporated in the u.s.a. and other countries. filterlab, hampshire, hi-tech c, linear active thermistor, mtp, seeval and the embedded control solutions company are registered tradema rks of microchip technology incorporated in the u.s.a. silicon storage technology is a registered trademark of microchip technology inc. in other countries. analog-for-the-digital age, a pplication maestro, bodycom, chipkit, chipkit logo, codeguard, dspicdem, dspicdem.net, dspicworks, dsspeak, ecan, economonitor, fansense, hi-tide, in-circuit serial programming, icsp, mindi, miwi, mpasm, mpf, mplab certified logo, mplib, mplink, mtouch, omniscient code generation, picc, picc-18, picdem, picdem.net, pickit, pictail, real ice, rflab, select mode, sqi, serial quad i/o, total endurance, tsharc, uniwindriver, wiperlock, zena and z-scale are trademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of mi crochip technology incorporated in the u.s.a. gestic and ulpp are registered trademarks of microchip technology germany ii gmbh & co. & kg, a subsidiary of microchip technology inc., in other countries. all other trademarks mentioned herein are property of their respective companies. ? 2012, microchip technology incorporated, printed in the u.s.a., all rights reserved. printed on recycled paper. isbn: 978-1-62076-650-7 note the following details of the code protection feature on microchip devices: ? microchip products meet the specification cont ained in their particular microchip data sheet. ? microchip believes that its family of products is one of the mo st secure families of its kind on the market today, when used i n the intended manner and under normal conditions. ? there are dishonest and possibly illegal meth ods used to breach the code protection fe ature. all of these methods, to our knowledge, require using the microchip pr oducts in a manner outside the operating specif ications contained in microchip?s data sheets. most likely, the person doing so is engaged in theft of intellectual property. ? microchip is willing to work with the customer who is concerned about the integrity of their code. ? neither microchip nor any other semiconduc tor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as ?unbreakable.? code protection is constantly evolving. we at microchip are committed to continuously improving the code protection features of our products. attempts to break microchip?s c ode protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your softwa re or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the company?s quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperi pherals, nonvolatile memory and analog products. in addition, microchip?s quality system for the design and manufacture of development systems is iso 9001:2000 certified. quality management s ystem certified by dnv == iso/ts 16949 ==
ds70591e-page 456 ? 2009-2012 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://www.microchip.com/ support web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit farmington hills, mi tel: 248-538-2250 fax: 248-538-2260 indianapolis noblesville, in tel: 317-773-8323 fax: 317-773-5453 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 santa clara santa clara, ca tel: 408-961-6444 fax: 408-961-6445 toronto mississauga, ontario, canada tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2401-1200 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8569-7000 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - chongqing tel: 86-23-8980-9588 fax: 86-23-8980-9500 china - hangzhou tel: 86-571-2819-3187 fax: 86-571-2819-3189 china - hong kong sar tel: 852-2401-1200 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8203-2660 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 asia/pacific india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4123 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-2566-1512 fax: 91-20-2566-1513 japan - osaka tel: 81-66-152-7160 fax: 81-66-152-9310 japan - yokohama tel: 81-45-471- 6166 fax: 81-45-471-6122 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-5778-366 fax: 886-3-5770-955 taiwan - kaohsiung tel: 886-7-536-4818 fax: 886-7-330-9305 taiwan - taipei tel: 886-2-2500-6610 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 uk - wokingham tel: 44-118-921-5869 fax: 44-118-921-5820 worldwide sales and service 11/29/11


▲Up To Search▲   

 
Price & Availability of DSPIC33FJ64GS606

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X